How can the data point, where values start to increase for the first time in a data, be found, as this increase continues at the following 30 values?

1 回表示 (過去 30 日間)
Hi,
I have 1*1630 data. I want to find the first data point where the values in this data start to increase. However, to accept this as the value I am looking for, this increase should continue in the next 30 values after the first increase.
How do I find this data point? Can you help me with that, please?
Regards

採用された回答

Matt J
Matt J 2021 年 5 月 10 日
編集済み: Matt J 2021 年 5 月 10 日
This uses the File Exchange contributions groupTrue and groupFcn (Download):
G=groupTrue( diff(data)>0 );
g=find( groupFcn(@numel,G,G)>=30 , 1);
if isempty(g), error 'No increasing region of length 30 found'; end
start=find( G==g , 1)
  3 件のコメント
Matt J
Matt J 2021 年 5 月 11 日
That is almost certainly because you did not download it from the Download link that I gave you.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDownloads についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by