Find consecutive values in a vector that are above a threshold
Ältere Kommentare anzeigen
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 Kommentar
Azzi Abdelmalek
am 31 Mai 2013
Can you explain with an example?
Akzeptierte Antwort
Weitere Antworten (1)
Youssef Khmou
am 31 Mai 2013
Bearbeitet: Youssef Khmou
am 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);
Kategorien
Mehr zu Vector Fields finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!