How to show peak coordination

조회 수: 1(최근 30일)
Phudit Kanittasut
Phudit Kanittasut 2021년 3월 8일
답변: Monisha Nalluru 2021년 3월 12일
How can I show the x ,y coordinate of each peak (dot).

채택된 답변

Monisha Nalluru
Monisha Nalluru 2021년 3월 12일
findpeaks() is used to find the local maxima in given data
As an example
x = 1:9;
pp = [50 100 1800 300 2500 1500 3000 3500 5800];
[pks,locs] = findpeaks(pp);
plot(x, pp)
hold on
plot((locs), pks, 'r*') % plot the peaks in red
hold off

추가 답변(0개)


Community Treasure Hunt

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

Start Hunting!

Translated by