Finding first 5 maxima and its consecutive minima.

11 vues (au cours des 30 derniers jours)
Jay Vaidya
Jay Vaidya le 19 Nov 2020
Commenté : Walter Roberson le 18 Déc 2020
I have the signal in the plot which is zoomed in a time window to show the peaks. I want to find not only the maxima (I did this using
findpeaks()
) but also it's consecutive minimas. Meaning, the first 5 maximas and the two minimas around each first 5 maxima.
I am not able to find minimas. I tried inverting the signal and using findpeaks(), but still merging it with the data of maximas in order is something that I am still not able to do. Can I find maximas and minimas using diff() or derivative rise and fall and store the positions in sequence in one flow?
  1 commentaire
Walter Roberson
Walter Roberson le 18 Déc 2020
findpeaks() on the negative of the signal to find minima.

Connectez-vous pour commenter.

Réponse acceptée

Swetha Polemoni
Swetha Polemoni le 23 Nov 2020
Modifié(e) : Swetha Polemoni le 23 Nov 2020
Hi Jai Vaidya,
You can use "islocalmin" to find minima.
Here is an example that uses "findpeaks" to find minima.
Hope this helps.

Plus de réponses (0)

Tags

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by