Question: Write a Matlab program (as a m file) to perform, in order, the following: a) Define three time vectors between 0 and 20 seconds. The
Write a Matlab program (as a m file) to perform, in order, the following: a) Define three time vectors between 0 and 20 seconds. The first (t1) with an increment of 0.05 seconds, the second (t2) with an increment of 0.25 seconds, and the third (t3) with an increment of 0.75 seconds. b) Define 3 vectors (column format) containing the values of the following function of time: F1 (t) = sin(2t) + cos(3t) computed at each value of the three time vectors as defined above in (a) c) Save the time vectors and the three vectors (and only them) to a file on your hard drive. d) Clear Matlab workspace. e) Load the time vectors and the three vectors (and only them) from the hard drive to the Matlab workspace. f) Plot F1(t1), F1(t2) and F1(t3) versus time on the same figure and on the same set of axes. g) Plot F1(t1), F1(t2) and F1(t3) versus lime on the same figure but on different sets of axes h) include on both figures (see f and g) title, legend, x and y axis labels. (bonus +5) Define a matrix containing F1(t1), F1(t2) and F1(t3). Submit a printout of the Matlab code and the three figures (from f)- Submit the (Last_nameFirst name.m) file to the instructor email
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
