MATLAB: Frequency analysis using FFT

already sampled datafftfrequency analysis

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

Best Answer

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.