FFT output is a frequency vector that can apply to this function?
3 次查看(过去 30 天)
显示 更早的评论
In the Description of fft, it said "If X is a vector, then fft(X) returns the Fourier transform of the vector.". If I read a wav file into matlab,
x = wavread(wavFile);
xF = fft(x)
What kind of thing xF is? Is it a vector, matrix or multidimensional array? If I would like to implement melfilter function, can I use xF as the frequency vector?
If I cant, how can I create a frequency vector from the wav file I read?
Thanks
0 个评论
采纳的回答
Star Strider
2016-11-6
Your ‘xF’ variable contains the complex Fourier transform of ‘x’. For a vector, it take the Fourier Transform of the vector For a matrix, it takes the Fourier transform column-wise (along the columns). Since your ‘x’ is most likely a (Nx2) matrix, (one column for each channel), ‘xF’ will have the same dimensions.
I still prefer the R2015a documentation for fft (link), because the code between the first (top) two plot figures is descriptive and easy to understand.
4 个评论
Star Strider
2016-11-6
It would be. Cutting it frame-to-frame would significantly reduce the frequency resolution, unless you zero-pad your vector by using a relative large (and constant) value for the length of the Fourier transform (noted as ‘NFFT’ in the documentation).
I’m not certain what you’re doing with your signal. If you want to do a time-frequency analysis of it, and if you have the Signal Processing Toolbox, see the spectrogram function. It will probably do the time-frequency analysis much more easily than writing your own code.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!