FFT output is a frequency vector that can apply to this function?
조회 수: 2 (최근 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!