フィルターのクリア

Calculate std with retime function

4 ビュー (過去 30 日間)
Petr Michalek
Petr Michalek 2023 年 7 月 25 日
移動済み: Cris LaPierre 2023 年 7 月 25 日
Hello,
I have a timetable tab20sel vith 4 variables Var1-Var4 (wind velocity components and temperature), sampled at 10 Hz, first four rows:
'2017-10-28 08:00:00.000' 9.0600 2.1200 -0.5900 8.4100
'2017-10-28 08:00:00.100' 8.2800 2.5100 -0.3900 8.4200
'2017-10-28 08:00:00.200' 8.2600 2.4400 0.0600 8.6800
'2017-10-28 08:00:00.300' 8.1700 2.7200 -0.1700 8.4700
I would like to calculate the standard deviation of all four variables in 10-minute interval with retime function:
newtimestep=minutes(10);
tab20retstd=retime(tab20sel,newtimestep,@std);
but I get an error which I dont understand:
Error using timetable/retime
All input timetables must have row times with the same data type as target time vector.
Neither this code doesnt work:
tab20retstd=retime(tab20sel,newtimestep,@(v)std(v,[],1));
What am I doing wrong? Thanks.

採用された回答

Petr Michalek
Petr Michalek 2023 年 7 月 25 日
移動済み: Cris LaPierre 2023 年 7 月 25 日
I have already found a working code:
tab20stdret=retime(tab20sel,'regular',@std,'TimeStep',newtimestep);
Petr

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTime Series Events についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by