Selection Portions of a Plot
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Suppose I have this function with multiple peaks that ranges from time = 2000 s to time = 7000 s.
Suppose there are five peaks and they are seperated evenly apart.
Suppose I want to pick the third peak.
How would I do this in MATLAB?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 18 de Oct. de 2012
Editada: Azzi Abdelmalek
el 18 de Oct. de 2012
t=0:0.1:30
y=sin(t)
[peaks,idx]=findpeaks(y)
%the third peak is
peaks(3)
3 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!