why it doesnt return inverse fourier transfrom?
Infos
Cette question est clôturée. Rouvrir pour modifier ou répondre.
Afficher commentaires plus anciens
clc
n1=[77 -5 1 -5];
f=length(n1);
i=0;
t=zeros(f);
for i=1:f;
t(i)=ifft(n1(i));
end
for i=1:f;
disp(t(i));
end
Réponses (1)
David Goodmanson
le 11 Nov 2017
Modifié(e) : David Goodmanson
le 13 Nov 2017
Hi jasleen,
It doesn't work because with the for loop you are giving ifft the elements of n1 one at a time. Each of those four times, the ifft operates on a single scalar number. But the ifft needs the entire vector n1 for input and outputs a vector of the same length:
n1=[77 -5 1 -5];
t = ifft(n1);
disp(t) % display the entire vector at once, too
Cette question est clôturée.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!