Find peak and plot graph from peak

2 visualizaciones (últimos 30 días)
Phudit Kanittasut
Phudit Kanittasut el 26 de Feb. de 2021
Comentada: Star Strider el 26 de Feb. de 2021
At first , Im new here so how can I plot the peak from my data
  2 comentarios
Walter Roberson
Walter Roberson el 26 de Feb. de 2021
That code already plots the peaks.
Phudit Kanittasut
Phudit Kanittasut el 26 de Feb. de 2021
and how can I only dot the peak and hide the graph

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 26 de Feb. de 2021
I am not certain what you want to do.
If you want to get the peaks and their indices, request those outputs:
[pks,locs] = findpeaks(pure_brain(:,2)); % Get Peaks (‘pks’) and Peak Indices (‘locs’)
I have no idea what is in your data file, however if you want to plot them and indicate them, try this:
x = 1:size(pure_brain,1);
figure
plot(x, pure_brain(:,2))
hold on
plot(x(locs), pure_brain(locs,2), '^r')
hold off
grid
.
  5 comentarios
Phudit Kanittasut
Phudit Kanittasut el 26 de Feb. de 2021
Oh I got it Thx u so much
Star Strider
Star Strider el 26 de Feb. de 2021
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Iniciar sesión para comentar.

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