Frequency analysis using FFT
18 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thomas Leiw
le 11 Sep 2015
Commenté : Star Strider
le 13 Sep 2015
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 commentaires
Réponse acceptée
Star Strider
le 12 Sep 2015
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 commentaires
Star Strider
le 13 Sep 2015
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);
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Time-Frequency Analysis dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!