Effacer les filtres
Effacer les filtres

How to Plot Phase Response of Discrete Time Fourier Transform (DTFT)?

4 vues (au cours des 30 derniers jours)
Matlab Student
Matlab Student le 29 Fév 2016
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.
How do I get the proper zero phase response/What am I doing wrong here?

Réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by