Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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