How to detect a peak at a given location?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a plot. I have to detect the peak at a given location. But the peak is not starting from the given point. My location point is 410 in x-axis.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150883/image.png)
0 件のコメント
回答 (1 件)
Andrei Bobrov
2015 年 10 月 25 日
編集済み: Andrei Bobrov
2015 年 10 月 25 日
A = [400,192;...;410,204;...;420,188]; - your array.
[ypeak,ii] = findpeaks(A(:,2));
xpeak = A(ii,1);
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!