FFT (fast fourier transform) matlab default example (need explanation)
1 次查看(过去 30 天)
显示 更早的评论
I try to figure out how the FFT command works on matlab and I came across this example that matlab central gives out at this link http://www.mathworks.com/help/matlab/ref/fft.html
Can somebody explain to me how this code works?? If not all the code than this part of it
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1); %why 2+1 ????
2 个评论
Yona
2014-8-27
NFFT/2+1
is equal to
(NFFT/2)+1
in 0:10 you have 11 point because you have the start and stop too. so you need to add another point.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!