how to replace multiple values per second with their standard deviaton?

4 ビュー (過去 30 日間)
Viktor G.
Viktor G. 2020 年 8 月 4 日
回答済み: Viktor G. 2020 年 8 月 4 日
I know about the function that gives you the mean value of the multiple data points however in this case I need their standard deviaton, so this function wont do it.
TT2 = retime(TT,'hourly','mean')
I am guessing i have to use a for loop, but i am just wondering if there is a more efficent way to do it other than comparing all of the values. I have a table that has 200 values per second and in the end i just need to have 1 value per second that is equal to the standard deviation of those 200. I am using this for loop
for i=i:200:L-r
Y1(k,:)=std(Z(i:(i+200-1),:));
k=k+1;
end
However I am not always sure that there are exactly 200 values per second (for example there might be 199 or 201 sometimes), and that is where the function mentioned first would've been helpfull. I would appreciate any help.
Var1 Var2 Var3
___________________ _______ _______
01/02/2014 00:07:24 -3.5469 -102.63
01/02/2014 00:07:24 -5.0115 -102.78
01/02/2014 00:07:24 -6.7526 -103.03

採用された回答

dpb
dpb 2020 年 8 月 4 日
Read the doc more carefully...
TT2=retime(TT,'secondly',@std)

その他の回答 (1 件)

Viktor G.
Viktor G. 2020 年 8 月 4 日
Don't know how I've missed it. Thank you very much

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by