please i need all iteration in one vector
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
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 Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!