burst duration

조회 수: 4 (최근 30일)
James
James 2011년 9월 21일
I'm looking at a simple temperature time series over many years. I'm trying to investigate the duration of bursts in above a specific threshold temperature in this series but can't think of a way for Matlab to search for these bursts and output the duration of them. So far all I have come up with is a for loop with a lot of if statements inside but this is very taxing on cpu and ram and takes a long time. Can anyone think of a quicker way to output this kind of information?
  댓글 수: 1
James
James 2011년 9월 21일
Long story short, I'm trying to investigate the number of consecutive values in a vector that are greater (or less) than a threshold value.

댓글을 달려면 로그인하십시오.

채택된 답변

Harry MacDowel
Harry MacDowel 2011년 9월 21일
I do not know what do you mean by consecutive values. You mean 1,2,3,4,5,6,7... consecutive? Or 1,1,1,1,1,1,1.. consecutive?
You can try:-
temp = data - threshold;
position = find(temp>0);
That is if you are going for positions of data greater than a threshold value. If it is case B of consecutive values then you are done. If you are looking for a pattern, manipulate the position data you found.
help find

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by