Question

# To make a function that returns more than one vector as an answer, you just need to use [output1,output2] or [outputl output2] as your outputs when defining the function. Write a script file Double Random that creates a random 10 x 10 matrix A and doubles all the elements of A between the values 0.2 and 0.8. Error Checking. One common use of IF statements is to check for errors in user input. For example, if you use the standard quadratic equation x=\frac{-b \pm \sqrt{b^{2}-4 a c}}{2 a} with the value of a = 0, you will have division by zero. With this in mind, create a function Quad Eq Check that accepts as input variables a, b, and c, and returns the correct two solutions of the equation if a + 0, and returns the value -c/b if a = 0. From where does the value -c/b come and what solution are you giving in this situation? Write a function Check Negative that accepts a vector x as its input. The function should return x if all of the elements of x are positive, but it should returnx/2 if any elements are negative. Write a function Give Primes that takes as input a positive integer a and returns 2 vectors pr and notpr. The vector pr should contain all of the prime numbers less than or equal to a, and the vector notpr should contain all of the non-prime numbers less than or equal to a. Use the built-in is prime function and logical indexing.  Fig: 1  Fig: 2  Fig: 3  Fig: 4  Fig: 5  Fig: 6  Fig: 7