What exactly is the "n-point DFT" that fft() computes?

181 次查看(过去 30 天)
I am trying to understand exactly how matlab is computing the fft when you call fft(myData, N), where N < length(myData).
Is it basically doing something along the lines of FFT pruning, as described by: Pruned FFTs?
In other words, it is computing the "first K outputs of an N point FFT" as detailed in the above link from fftw.org?
Thanks

采纳的回答

Jonathan
Jonathan 2014-9-23
I found a site where you can get intelligent answers to your questions: FFT Matlab - What is a N-point FFT?
If you are going to perform a N-point FFT in MATLAB, to get an appropriate answer, the length of your sequence should be lesser than or equal to N. Usually this N is chosen in power of 2, because MATLAB employs a Radix-2 FFT if it is, and a slower algorithm if it is not.
So, if you give a sequence of length 1000 for a 2056 point FFT, MATLAB will pad 1056 zeros after your signal and compute the FFT. Similarly, if your sequence length is 2000, it will pad 56 zeros and perform a 2056 point FFT.
But if you try to compute a 512-point FFT over a sequence of length 1000, MATLAB will take only the first 512 points and truncate the rest. If you try to compare between a 1024 point FFT and a 2056-point FFT over a [1:1000], you will get a similar plot.
So the moral: choose your N to be greater than or equal to the length of the sequence.

更多回答(1 个)

Youssef  Khmou
Youssef Khmou 2014-9-23
N is the number of points used to calculate the fft, it does not increase physical resolution but adds more point to the spectrum for more visual resolution, N is arbitrary.
  2 个评论
Jonathan
Jonathan 2014-9-23
编辑:Jonathan 2014-9-23
Yes, I know. But how is it computing this when N<length(data)?
Youssef  Khmou
Youssef Khmou 2014-9-23
编辑:Youssef Khmou 2014-9-23
for every element of the frequency vector X(f), it is a sum of X(t)*exp(-2*pi*j*t*f) where t lies in [1 M], M is the length of the signal, and f lies in [1 N], and N is the value chosen whether N > M or N< M.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by