필터 지우기
필터 지우기

How to get a specified number of local maxima?

조회 수: 5 (최근 30일)
Chinwe Orie
Chinwe Orie 2018년 7월 14일
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
Paolo
Paolo 2018년 7월 14일
편집: Paolo 2018년 7월 14일
Have you tried specifying NPeaks? Check the documentation
Chinwe Orie
Chinwe Orie 2018년 7월 14일
No I haven't. Just did, it works. Thank you!

댓글을 달려면 로그인하십시오.

채택된 답변

Mohammad Mahmudul Hasan Fahome
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개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by