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

3 ビュー (過去 30 日間)
Matlab Student
Matlab Student 2016 年 2 月 29 日
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?

回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by