Find consecutive values in a vector that are above a threshold
Mostrar comentarios más antiguos
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 comentario
Azzi Abdelmalek
el 31 de Mayo de 2013
Can you explain with an example?
Respuesta aceptada
Más respuestas (1)
Youssef Khmou
el 31 de Mayo de 2013
Editada: Youssef Khmou
el 31 de Mayo de 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);
Categorías
Más información sobre Vector Fields en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!