フィルターのクリア

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 Center および File ExchangeMATLAB についてさらに検索

タグ

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by