What is the difference between ifft(f) and ifft(f,n)?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. I have one vector f with some values of velocity in function of the frequency. I have to plot this velocities in function of the time. I don't know if I have to use ifft(f) or ifft(f,n). In this last case, what is n?
Thanks.
1 Kommentar
Daniel Shub
am 28 Jan. 2013
I am not a huge fan of RTFM answers, but in this case ... what does help ifft or doc ifft say about what n is?
Antworten (1)
John Petersen
am 29 Jan. 2013
Bearbeitet: John Petersen
am 29 Jan. 2013
if N =length(f), there is no difference between ifft(f) and ifft(f,N)
2 Kommentare
John Petersen
am 4 Feb. 2013
You can zero pad f so that it has the N samples. e.g. Say f is a 256 element column array and N = 400.
f1 = [f; zeros(400-256,1)];
iF = ifft(f);
iF1 = ifft(f1,N);
figure;plot(iF1);
hold on; plot(iF,'r')
Now you can see the difference, just zero padded at the end. Is this what you wanted?
Does the time vector correspond to the sampling points of the signal f?
Siehe auch
Kategorien
Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!