Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DO IT IN MATLAB PLZ ASAP Problem 4 Define a vector t from-1 to 1 with step size

ID: 2249504 • Letter: D

Question

DO IT IN MATLAB PLZ ASAP

Problem 4 Define a vector t from-1 to 1 with step size = 0.01. Define the following functions as anonymous functions (they are all defined in the same file). g(t) = cos(40rt) Isin(4nt) + 2] g2 = e-2t cos(10) sin(4nt) 4rt gs(t) = g,(t) = cos(20t) + cos(22t) plot the g(t), 92(t),9s(t), and g4(t) on the same figure window using subplot. Break the Figure window into a 2-by-2 matrix of small axes. gi(t) should occupy position 1, g2(t) should position 2, gs(t) should occupy position 3, 94(t) should position 4. Use xlim to set the limit of the x-axis to -1 ylim to set the y-axis limit of g (t) to -3 3] ylim to set the y-axis limit of g2(t) to -10 10 ylim to set the y-axis limit of gs(t) to [-0.5 1.2 ylim to set the y asi ito 222 Label x-axis as time and each y-axis as as the corresponding function.

Explanation / Answer

subplot(2,2,1) t=[-1:0.01:1]; g1 = cos(40*pi*t)(sin(4*pi*t)+2); ax1 = subplot(2,2,1); plot(t,g1) xlabel('time'); ylabel('g1(t)'); xlim(ax1,[-1 1]) ylim(ax1,[-2 2]) subplot(2,2,2) g2 = (e^(-2*t))*cos(10*pi*t); ax2 = subplot(2,2,2); plot(t,g2) xlabel('time'); ylabel('g2(t)'); xlim(ax2,[-1 1]) ylim(ax2,[-10 10]) subplot(2,2,3) g3 = (sin(4*pi*t))/(4*pi*t); ax3 = subplot(2,2,3); plot(t,g3) xlabel('time'); ylabel('g3(t)'); xlim(ax3,[-1 1]) ylim(ax3,[-0.5 1.2]) subplot(2,2,4) g4 = (cos(20*pi*t)) + (cos(22*pi*t)); ax4 = subplot(2,2,4); plot(t,g4) xlabel('time'); ylabel('g4(t)'); xlim(ax4,[-1 1]) ylim(ax4,[-2.2 2.2])