QUESTION

3. Plot spectrum of sinusoids (bar, instead of stem plot please)
The following MATLAB code defines a vector zz, which corresponds to the signal z(t):
tt = -10:0.01:10; %time is in seconds
kk=2;
zz = kk*cos(kk*tt);
kk=4;
zz = zz + kk*cos(kk*tt - pi/3);
kk=6;
zz = zz + real(2*exp(j*pi/4)*exp(j*kk*tt));

a) Write a formula for z(t) in terms of sinusoids in standard form,
that is, z(t)= A0 + ∑k Ak cos(ωkt +ϕk). (5 points)
b) Plot the spectrum for z(t) with labels for all of the frequencies and complex amplitudes. Provide both the MATLAB codes (10 points) and figure. (5 points)

Public Answer

UALOW4 The First Answerer