how this function of idtft works
Show older comments
hey this program of mine computes inverse discrete time fourier transform but theorically i dont know how it works, can anybody help me ?
function x=idtft(w,X,n)
% x=IDTFT(w,X,n) computes the invrse discrete-time fourier transform of X.
% w is the independent variable in the frequency domain in radians.
% X is the spectrum X(e^jw)
% n is the time values at which the inverse transform is to be computed
%
% See also DTFT, CTFT, ICTFT
dw=w(2)-w(1);
idx_2p=find((w>=min(w)) & (w<min(w)+2*pi));
x=zeros(size(n));
for i=1:length(n)
x(i)= sum(X(idx_2p).*exp(1j*w(idx_2p)*n(i))*dw)/2/pi;
end
Accepted Answer
More Answers (0)
Categories
Find more on Discrete Fourier and Cosine Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!