please i need all iteration in one vector

1 回表示 (過去 30 日間)
amr atyia
amr atyia 2016 年 4 月 13 日
コメント済み: Kuifeng 2016 年 4 月 14 日
clear,clc
data=xlsread('standing.xlsx');
accy=data(:,2);
inc=120;
for i=1:inc:length(accy)-rem(length(accy),inc);
j=i+inc-1;
dev =std(accy(i:j,:))
end

採用された回答

Kuifeng
Kuifeng 2016 年 4 月 13 日
inc = 120;
accy(length(accy)-rem(length(accy),inc)+1:end) = [];
accy_2D = reshape(accy, inc, (length(accy)-rem(length(accy),inc))/inc);
dev = std(accy_2D);
  2 件のコメント
amr atyia
amr atyia 2016 年 4 月 13 日
thank you very much you are a professional it's okay but i don't understand the code
Kuifeng
Kuifeng 2016 年 4 月 14 日
the second line removes the numbers after the row 1201.
The third line reshape this one vector to a 2D-Array with 120 rows, and 10 columns.
The last calculate std in each column

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by