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!