Question: Write a script to graph the result of Matlab s log ( x ) for 1 0 2 < = x < = 1 0

Write a script to graph the result of Matlabs log(x) for 102<= x <=102 together with the results from myLnX for N =5,10,
and 30 in a single figure. Use linear scales for both plot axis, i.e. Matlabs plot() and 501 logarithmically spaced points for x.
Notes for the MatlabGrader script submission:
Comment out clear or clear all in your script when submitting to MatlabGrader.
Generate and store the figure handle examFig1 for the graph before doing any plotting commands, using
examFig1= figure(1);
Properly label both axis using the appropriate variable names (x, ln x).
Include a legend for each line, starting with log(x) followed by N =5, N =10, and N =30.
Ensure that your legend does not obstruct any part of your plot.
Use the transpose () of Matlabs logspace command to generate the necessary column vector x using 501 logarithmically
spaced points covering the requested x value range: x = logspace(-2,2,501);
Do not include the source code for myLnX in your script. A correct version is available to be called on Matlab Grader

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!