How to Plot Phase Response of Discrete Time Fourier Transform (DTFT)?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have implemented the DTFT in a MATLAB function.The function takes the array of values and the starting index as its arguments.
function[X]=DTFT(x,n)
syms w
l=length(x);
n_=n:l+n-1;
e=exp(-1j*w*n_);
X=sum(x.*(e));
end
I have implemented the DTFT function with the following code :
x=[2 1 0 1 2];
hold on
subplot (1,2,1) ;ezplot(abs(DTFT(x,-2)));
title('DTFT of Original Signal');
subplot(1,2,2); ezplot(angle(DTFT(x,-2)));
title('Phase Response of Original Signal');
As per the book, the magnitude of the DTFT is correct; however, the phase response should be zero for the symmetric array of x given above, which isn't the case.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/156300/image.jpeg)
How do I get the proper zero phase response/What am I doing wrong here?
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!