Frequency analysis using FFT
18 次查看(过去 30 天)
显示 更早的评论
Dear colleagues, my question is How to analyse the frequencies and its corresponding magnitude within an array by using FFT function in MatLab?
I am certain that the values in the array have the following information:
- Already sampled at 1kHz
- Contains 30001 samples
- The sampled waveform is superimposed with multiple frequencies (e.g. 15Hz, 34Hz, etc)
I would like to analyse the magnitudes of each frequency band that is contained in the samples.
Thank you very much for any help!
Thomas
0 个评论
采纳的回答
Star Strider
2015-9-12
The fft documentation has everything you need in the code between the first two plot images. Your Nyquist frequency is 500 Hz.
To get the peak values and frequencies, use the Signal Processing Toolbox findpeaks function. It has a number of name-value pair arguments that make it extremely flexible.
8 个评论
Star Strider
2015-9-13
It is correct, and entirely consistent with the previous version of the documentation on the fft function. (The documentation for fft changed in R2015b. The previous versions seemed to me to be more straightforward.) The single-sided fft in the documentation is correct, since it seems to have been taken from the R2015b fft documentation.
For your data, the amplitudes in my code at 16.3 Hz even with slightly revised code (corresponding to the R2015a fft documentation), are about 0.1 of those stated.
The only significant change in my code is:
[Pks,Frq] = findpeaks(2*abs(Fd(Iv)), Fv, 'MinPeakDistance', 0.25, 'MinPeakHeight',0.01);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Time-Frequency Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!