Effacer les filtres
Effacer les filtres

How to get a specified number of local maxima?

5 vues (au cours des 30 derniers jours)
Chinwe Orie
Chinwe Orie le 14 Juil 2018
I have a signal and I only want the top two or three local maxima, I don't want the 5000 maxima that the findpeaks() function gives me. Is there a way to get this? Thanks.
  2 commentaires
Paolo
Paolo le 14 Juil 2018
Modifié(e) : Paolo le 14 Juil 2018
Have you tried specifying NPeaks? Check the documentation
Chinwe Orie
Chinwe Orie le 14 Juil 2018
No I haven't. Just did, it works. Thank you!

Connectez-vous pour commenter.

Réponse acceptée

Mohammad Mahmudul Hasan Fahome
Modifié(e) : Mohammad Mahmudul Hasan Fahome le 30 Sep 2018
You can use this function. I used this for taking top 2 frequency spectra maxima. You can find the min with the same logic.
**Update:Replace max(j) with val(j) in the function

Plus de réponses (0)

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by