Borrar filtros
Borrar filtros

Getting the frequency of all peaks after doing fft

3 visualizaciones (últimos 30 días)
Chris Matthews
Chris Matthews el 27 de Sept. de 2017
Respondida: Star Strider el 27 de Sept. de 2017
Im running a pretty old version of matlab (without the findpeaks function) and want to determine the frequency of all of the peaks in a signal after doing fft.
Any ideas about how to go about this? Ideally, i want to do my fft on a signal, determine the frequency values and spit them out into a table or something.
Thanks for help!
Chris

Respuestas (2)

KSSV
KSSV el 27 de Sept. de 2017
You can achieve the task with ease......sort the frequencies f, in descending order....and pick the first k number of frequencies you want.
  2 comentarios
Chris Matthews
Chris Matthews el 27 de Sept. de 2017
How do you do this? That's the but I'm stuck on.
KSSV
KSSV el 27 de Sept. de 2017
f = rand(10,1) ;
%%sort them
[f_sort,idx] = sort(f,'descend') ;
%%pick the first four
iwant = f_sort(1:4)

Iniciar sesión para comentar.


Star Strider
Star Strider el 27 de Sept. de 2017
There are several peak-finding algorithms in the File Exchange. Search the File Exchange (link to the search) for one that does what you want.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by