FFT default process when samples are NOT a power of 2?

4 ビュー (過去 30 日間)
kleanthis koup
kleanthis koup 2016 年 4 月 15 日
コメント済み: kleanthis koup 2016 年 4 月 18 日
Hello, I have a musical piece of 2,5sec at 48000Hz sampling rate.
I used mirtoolbox to calculate some measures such as mircentroid etc. I did not specify number of bins or the frames for the computation of spectrum. For example I used mircentroid(‘musical piece’).
So now i’d like to know how many bins and how many samples the algorithm used?
I think the frame default is at 0.05sec. So the samples are 2400 samples in my case? But this is not a power of 2.

採用された回答

Wayne King
Wayne King 2016 年 4 月 15 日
That is not part of a MathWorks' product. It is part of the this tool on the file exchange MIRToolbox
If you put a breakpoint in the mirspectrum.m routine inside of the class folder @mirspectrum, you can step through the file and see what the defaults are doing if it isn't described in the documentation.
However, if what you describe is accurate, then the frequency resolution of the DFT (discrete Fourier transform) does not depend on it being a power of two. The frequency resolution or the DF, step size in DFT bins, is Fs/N where Fs is the sampling frequency and N is the length of the data. So here that is 48e3/2400 or 20 Hz.
  2 件のコメント
kleanthis koup
kleanthis koup 2016 年 4 月 15 日
MIRToolbox calls fft function of Matlab. But i was confused with the whole process. Thanks a lot!
kleanthis koup
kleanthis koup 2016 年 4 月 18 日
Have a nice day, i checked that the window size is 0.05 sec with half overlapping. This information changes my samples? I calculated the samples by this: 0.05sec * 48000 samples / sec = 2400 samples.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by