average and standard deviation of one column of a matrix
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to calcualte the average and standard deviation for one column of a 1000x10 matrix.
Is there a quicker/efficient way or should I use existing code :
theSum = 0;
for k = 1 : length(x)
theSum = theSum + x(k);
end
theMean = theSum / length(x);
댓글 수: 0
채택된 답변
per isakson
2019년 5월 5일
편집: per isakson
2019년 5월 5일
댓글 수: 2
per isakson
2019년 5월 7일
"result is obtained based on all columns rather than just one? " Yes
X = rand(5);
mean(X(:)), std(X(:))
"2a- number of occurences for ..." The values of the "matrix of 1000x10" are they whole numbers?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!