How to Plot Phase Response of Discrete Time Fourier Transform (DTFT)?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Discrete Fourier and Cosine Transforms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!