Question: (30 points) Prepare a Matlab script that does the following: Creates a random number and assigns it to a variable. (use randn command in matlab

(30 points) Prepare a Matlab script that does the following: Creates a random number and assigns it to a variable. (use randn command in matlab to generate a random number). Make sure that the random number generated above is larger than 2 by placing the generating code into a loop of some sort. WARNING: Do not use the built in functionality of randn to specify an interval of selection! Create an exponential function whose base is the random number in the above item and record it as an anonymous function. Write a line of code that graphs this function on a reasonable interval with reasonable sampling length. (not too large, not too small!) Explain with a comment on your script why we wouldn't want a sampling length to be too large or too small. Try to graph sin of the function you have generated in the third item. Did you need to do anything differently to get a nice graph, if so why do you think that was? Explain with a comment. Upload your script file as "Question 1.m. The system automatically marks your files with your student id and name, you don't need to do it yourself. Do not upload the picture of your solution or any other file format than ".m. Wrong file names will get -10 points, wrong file formats will get -20 points
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
