How to show peak coordination

1 visualización (últimos 30 días)
Phudit Kanittasut
Phudit Kanittasut el 8 de Mzo. de 2021
Respondida: Monisha Nalluru el 12 de Mzo. de 2021
How can I show the x ,y coordinate of each peak (dot).

Respuesta aceptada

Monisha Nalluru
Monisha Nalluru el 12 de Mzo. de 2021
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);
figure
plot(x, pp)
hold on
plot((locs), pks, 'r*') % plot the peaks in red
hold off

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by