필터 지우기
필터 지우기

Identify time interval where values are greater than a threshold

조회 수: 23 (최근 30일)
Ahmed Hassan
Ahmed Hassan 2018년 9월 14일
답변: Walter Roberson 2018년 9월 15일
Hi,
I have a time series and I need to identify the total time interval where the values are greater than certain threshold, either positive or negative.
Any idea what's the best command to use? I'm trying to use find but I don't see how to get it work in complicated cases (like when the signals exceeds the threshold and comes back several times).
  댓글 수: 1
dpb
dpb 2018년 9월 15일
What's the definition of exceedance--all time irregardless of how long or many interruptions in being above threshold or something else?
ix=v>threshold;
is the logical addressing vector that will return all elements that are over the threshold; how to determine a time associated would depend on whether is regularly-sampled time series or irregular clock times or...

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

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 15일
Simple case:
nnz(YourTimeseries.Data > threshold)
This is a count. If you needed to convert it to time, then you would multiply by the interval between samples, assuming that interval is constant.
The expressions would be more complicated if you wanted to check that values are within a range (or outside of a range).
If the intervals are not constant and you need to find the time interval, then you need to define how you want to handle transitions. If the condition is not met at time t1, but is met at adjacent time t2, then do you want to assume that the condition become true half way between t1 and t2, or should you allocate the whole of t2-t1 as being part of the interval, or do you want to look at the values at those times and calculate the slope to figure out when the boundary was crossed, or ... ?

카테고리

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

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by