フィルターのクリア

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 Center および File ExchangeDescriptive Statistics についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by