How to get a specified number of local maxima?
5 次查看(过去 30 天)
显示 更早的评论
Chinwe Orie
2018-7-14
编辑: Mohammad Mahmudul Hasan Fahome
2018-9-30
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.
采纳的回答
Mohammad Mahmudul Hasan Fahome
2018-9-29
编辑:Mohammad Mahmudul Hasan Fahome
2018-9-30
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!