Question: 2. Open a blank script using the edit command and save it as AM10IM_Q2_XXXXXX.m where XXXXXX is your candidate number. (a) Write the following two

 2. Open a blank script using the edit command and save

2. Open a blank script using the edit command and save it as AM10IM_Q2_XXXXXX.m where XXXXXX is your candidate number. (a) Write the following two functions as anonymous functions of the variable x: fi(x) = 3x, f2(x) = 2 cos(10x). (4 marks) (b) Plot f and f2 on the same axes for x (-1,1]. Add a suitable legend and axis labels and then save the figure as a .fig file called AM10IM_Q2b_xxxxxx.fig where xxxxxx is your candidate number. (Hint: check the documenta- tion for the savefig command). (6 marks) (c) Write the function f3(x) = fi(x) $2(x) as an anonymous function in x. (2 marks) (d) In a new figure, plot f3(2) as dotted red line in the interval [-1, 1), add a title and axis labels, centre the axes so they meet at the origin. Save the figure as a .fig file called AM10IM_Q2d_xxxxxx.fig where xxxxxx is your candidate number. (8 marks)

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 Databases Questions!