How to get a specified number of local maxima?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Chinwe Orie
am 14 Jul. 2018
Bearbeitet: Mohammad Mahmudul Hasan Fahome
am 30 Sep. 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 Kommentare
Akzeptierte Antwort
Mohammad Mahmudul Hasan Fahome
am 29 Sep. 2018
Bearbeitet: Mohammad Mahmudul Hasan Fahome
am 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
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!