Matlab question ( I just want the code ) Exercise: 1. Plot the following DTFT wi
ID: 1716212 • Letter: M
Question
Matlab question ( I just want the code )
Exercise: 1. Plot the following DTFT with respect to normalized frequency. You need to plot 4 graphs (the real part, the imaginary part, the magnitude spectrum, and the phase d flat plot tile and gtest comada Civea ) W-0piN:pi; N-256. 0.008-0.033e-ja) + 0.05e-j20-0.033e-J3 +0.008e-j40 2. Find the N-point frequency vector (W) and plot the frequency response of the following system with respect to normalized frequency. You need to plot 4 graphs (the real part, the imaginary part, the magnitude spectrum, and the phase spectrum) on a sheet of paper. (Use subplot, plot, title and gtext commands.) Take N=512. = 0.8x[n]-0.44x[n-1]+0.36x[n-2] + 0.02x[n-3]Explanation / Answer
(a)
N=256;
w=0:pi/N:pi;
dtft=N.*sinc(w.*N./2./pi)./(sinc(w./2./pi)).*exp(- j.*w.*(N-1)./2);
subplot(2,1,1)
Mag=abs(dtft);
plot(w./pi,Mag);
subplot(2,1,2)
Pha=angle(dtft);
plot(w./pi,Pha);
(b).
Mag=abs(dtft);
plot(w./pi,Mag);
subplot(2,1,2)