필터 지우기
필터 지우기

FFT output is a frequency vector that can apply to this function?

조회 수: 2 (최근 30일)
Peter
Peter 2016년 11월 6일
댓글: Star Strider 2016년 11월 6일
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

채택된 답변

Star Strider
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
Peter
Peter 2016년 11월 6일
Is that going to be the same if I cut the x frame to frame? lets say x(1:320) x(321:640) . . .
Star Strider
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개)

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by