How do I select a specific peak in a repeating pattern?
Mostrar comentarios más antiguos
y is my data and I am trying to find the first peak of each repeating part, but in the third part, the last peak is greater than the first peak so the last peak is the peak that gets selected. This problem only occurs when the last peak is greater than the first peak. Nothing I have tried has been working.
pks = findpeaks(y,'MinPeakHeight', 200,'MinPeakDistance',4000)
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 5 de Sept. de 2017
Editada: Image Analyst
el 5 de Sept. de 2017
0 votos
OK, not too hard (a variety of ways to do it probably), but you forgot to attach your data, so I'll wait for that, as will probably most people. I'd probably threshold and find each group, then scan within the group to find out when the data stops increasing and starts decreasing. You can use diff() for that.
1 comentario
Spencer Smith
el 5 de Sept. de 2017
Editada: Spencer Smith
el 5 de Sept. de 2017
Categorías
Más información sobre Descriptive Statistics en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
