Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercise 6 Copy-paste the code below into your script, compFunc: 1X-10:0.2:10; 3 plot (x,y1); 4 5 set the domain and range 6 axis ([-10 1e
Exercise 6 Copy-paste the code below into your script, compFunc: 1X-10:0.2:10; 3 plot (x,y1); 4 5 set the domain and range 6 axis ([-10 1e -10 10]); 7 8 title( Comparing functions) 9xlabel('x') 1 ylabel('y') 11 legend('y-x2') 12 Complete the following tasks: -) Fix the two errors in the code, so that it runs. If you cannot see where they are-try running the code, and the errors will appear in the Command Window (it even gives you a link to the line where the error is!). Create two more vectors, y2, and y3, such that y2cos(), and Hint: insert these vectors between line 2 and line 3 of your script. Modify the plot command to plot y1.y2, and y 3 together over X. > Fix the legend to show the correct labels. > Add print('module04.png', -dpng ) so that your plot automatically saves as a png when you run your code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started