how to detect peaks in a particular range?

5 visualizaciones (últimos 30 días)
ankita
ankita el 5 de Mzo. de 2014
Comentada: Asatur Khurshudyan el 29 de En. de 2020
I have a plot between 0-2000 Hz. I want to find peaks between 0-135 Hz only. I am using 'findpeaks' to detect the peaks but there is no way to extract the peaks within a particular limit. Can somebody suggest any method?

Respuesta aceptada

Mischa Kim
Mischa Kim el 5 de Mzo. de 2014
Editada: Mischa Kim el 5 de Mzo. de 2014
Ankita, you could simply limit your data in
[pks,locs] = findpeaks(data)
to cover only the frequency range between 0 and 135 Hz. For example, if your data is a 1-by-2001 vector (assuming x-vals to be evenly spaced) you could do
[pks,locs] = findpeaks(data(0:135))
  1 comentario
Asatur Khurshudyan
Asatur Khurshudyan el 29 de En. de 2020
What is the data are not evenly spaced? In my example,
findpeaks(data(0:135))
does not work.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by