Question regarding FFT MATLAB demo

5 ビュー (過去 30 日間)
Martin
Martin 2012 年 10 月 23 日
Hi,
I am computing the frequency response function of 1 input and 1 output data sample. I am using the demo found at http://www.mathworks.se/products/matlab/examples.html?file=/products/demos/shipping/matlab/fftdemo.html to calculate each power spectral density. I have a simple question regarding the demo. In this, they use a data sample of 251 measurements and use the command;
Y = fft(y,251);
This is perhaps a stupid question, but shouldn't the number 251 be replaced by 2^nextpow2(251) = 256?
Hope someone out there can answer me. Thanks in advance.
Kind regards, Martin Ulriksen.

採用された回答

Honglei Chen
Honglei Chen 2012 年 10 月 24 日
編集済み: Honglei Chen 2012 年 10 月 24 日
Hi Martin,
In theory, Fourier transform can be performed using any number of data points.
In old days, people prefer to have the number of FFT points to be power of 2 to take advantage of some computation benefit. Nowadays, at least in MATLAB, doing so no longer brings significant performance improvement so many people just use the length of data samples.
HTH

その他の回答 (1 件)

Martin
Martin 2012 年 10 月 24 日
Hi Honglei Chen,
Thank you very much for the answer - I really appreciate it.
//Martin.

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by