,Understand DTFT and DFT using MATLAB
I wish to understand the DTFT and DFT using MATLAB.
So I want to write a code which does the following:
plot X1[n]=COS(2*pi*201/1024*n) where n=0 to1023
plot X2[n]=rect(N) where N=1024 i.e. X2[n]=1 for n=0 to 1023; else X2[n]=0
plot multiplication of both i.e. X1(n)*X2(n)
plot magnitude plot of Y1(w)=DTFT of X1(n) for -pi<w<pi
plot magnitude plot of Y2(w)=DTFT of X2(n) for -pi<w<pi
plot convolution of Y1 and Y2 i.e. Z1(w)=Y1(w) ⊗ Y2(w)
plot frequency samples Z1[k] that are values of Z1(w) at w[k]=2*pi*k/N where 0<k<(N-1)
Plz help me with the codeI wish to understand the DTFT and DFT using MATLAB.
So I want to write a code which does the following:
plot X1[n]=COS(2*pi*201/1024*n) where n=0 to1023
plot X2[n]=rect(N) where N=1024 i.e. X2[n]=1 for n=0 to 1023; else X2[n]=0
plot multiplication of both i.e. X1(n)*X2(n)
plot magnitude plot of Y1(w)=DTFT of X1(n) for -pi<w<pi
plot magnitude plot of Y2(w)=DTFT of X2(n) for -pi<w<pi
plot convolution of Y1 and Y2 i.e. Z1(w)=Y1(w) ⊗ Y2(w)
plot frequency samples Z1[k] that are values of Z1(w) at w[k]=2*pi*k/N where 0<k<(N-1)
Plz help me with the code I wish to understand the DTFT and DFT using MATLAB.
So I want to write a code which does the following:
plot X1[n]=COS(2*pi*201/1024*n) where n=0 to1023
plot X2[n]=rect(N) where N=1024 i.e. X2[n]=1 for n=0 to 1023; else X2[n]=0
plot multiplication of both i.e. X1(n)*X2(n)
plot magnitude plot of Y1(w)=DTFT of X1(n) for -pi<w<pi
plot magnitude plot of Y2(w)=DTFT of X2(n) for -pi<w<pi
plot convolution of Y1 and Y2 i.e. Z1(w)=Y1(w) ⊗ Y2(w)
plot frequency samples Z1[k] that are values of Z1(w) at w[k]=2*pi*k/N where 0<k<(N-1)
Plz help me with the code dft, dtft, freqz, fft, matlab code MATLAB Answers — New Questions