How do I select a specific peak in a repeating pattern?
古いコメントを表示
y is my data and I am trying to find the first peak of each repeating part, but in the third part, the last peak is greater than the first peak so the last peak is the peak that gets selected. This problem only occurs when the last peak is greater than the first peak. Nothing I have tried has been working.
pks = findpeaks(y,'MinPeakHeight', 200,'MinPeakDistance',4000)
採用された回答
その他の回答 (1 件)
Image Analyst
2017 年 9 月 5 日
編集済み: Image Analyst
2017 年 9 月 5 日
0 投票
OK, not too hard (a variety of ways to do it probably), but you forgot to attach your data, so I'll wait for that, as will probably most people. I'd probably threshold and find each group, then scan within the group to find out when the data stops increasing and starts decreasing. You can use diff() for that.
1 件のコメント
Spencer Smith
2017 年 9 月 5 日
編集済み: Spencer Smith
2017 年 9 月 5 日
カテゴリ
ヘルプ センター および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
