Selection Portions of a Plot
1 回表示 (過去 30 日間)
古いコメントを表示
Suppose I have this function with multiple peaks that ranges from time = 2000 s to time = 7000 s.
Suppose there are five peaks and they are seperated evenly apart.
Suppose I want to pick the third peak.
How would I do this in MATLAB?
0 件のコメント
採用された回答
Azzi Abdelmalek
2012 年 10 月 18 日
編集済み: Azzi Abdelmalek
2012 年 10 月 18 日
t=0:0.1:30
y=sin(t)
[peaks,idx]=findpeaks(y)
%the third peak is
peaks(3)
3 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!