Part A: Intro to Plotting 1. Create a new, blank figure window. (figure) 2. Crea
ID: 3349203 • Letter: P
Question
Part A: Intro to Plotting 1. Create a new, blank figure window. (figure) 2. Create a time vector t from 0 to 47, with 40 elements. 3. You will eventually have a plot of sin() and cos() vs. t in the same figure window. For this purpose, create the vectors sin t and cos t. 4. Now plot sin(t) vs. t and plot cos() vs. t 5. Using plot commands (i.e. not using the controls in the plot window), re-adjust the axis lHimits to be 0 to 4 for the x-axis; and-1.2 to 1.2 for y-axis. 6. Use plot commands again to display a grid on the plot.Explanation / Answer
figure
t = linspace(0,4*pi,40);
plot(t,sin(t))
hold on
plot(t,cos(t))
axis([0 4*pi -1.2 1.2]);
grid on
The above is a MATLAB code