Find consecutive values in a vector that are above a threshold
이전 댓글 표시
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
Azzi Abdelmalek
2013년 5월 31일
Can you explain with an example?
채택된 답변
추가 답변 (1개)
Youssef Khmou
2013년 5월 31일
편집: Youssef Khmou
2013년 5월 31일
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);
카테고리
도움말 센터 및 File Exchange에서 Vector Fields에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!