Find consecutive values in a vector that are above a threshold
Afficher commentaires plus anciens
Hi everyone,
I have a vector of monthly values. I would now like to identify periods of months where the values exceeded my threshold for 5 months. I know I can find all the individual months with the find function but how do I add this extra condition saying, only show me their position if five months in a row exceeded the threshold?
thank you so much for any hint. Sandra
1 commentaire
Azzi Abdelmalek
le 31 Mai 2013
Can you explain with an example?
Réponse acceptée
Plus de réponses (1)
Youssef Khmou
le 31 Mai 2013
Modifié(e) : Youssef Khmou
le 31 Mai 2013
hi you can find function with multiple output that show the indices :
v=1:10;
[r,c]=find(r>5);
c represents the indices not the values , to make it more clear :
v=wrev(v);
[r,c]=find(r>5);
Catégories
En savoir plus sur Vector Fields dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!