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.
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!