필터 지우기
필터 지우기

Standard deviation of columns of a table

조회 수: 5 (최근 30일)
Wietze Zijpp
Wietze Zijpp 2022년 4월 4일
답변: Voss 2022년 4월 4일
Suppose I have a 30x3 table.
Now I would like to find the standard deviation of each column
I tried
stdev= std(montherrors(:,1))
But that does not work unfortunately

채택된 답변

Voss
Voss 2022년 4월 4일
Here's one way:
data = num2cell(randn(30,3),1);
montherrors = table(data{:})
montherrors = 30×3 table
Var1 Var2 Var3 _________ _________ __________ -0.034324 0.83995 -0.0038145 -0.6445 -1.0437 0.018688 -0.055602 -1.9906 0.064362 0.80357 -0.71912 0.11963 0.5391 1.5864 -0.51055 0.93737 -1.03 -0.99418 -1.3181 -0.50919 -1.028 -1.8117 0.015721 0.20497 -1.2746 1.5713 -1.5506 1.3839 -0.035712 1.0359 0.86795 0.426 -0.51133 -0.88336 -1.5662 0.39297 0.83966 -0.28617 0.76124 1.3973 0.012742 -0.20298 -0.69736 -0.85323 0.7816 0.85455 -0.53487 0.12378
stdev = std(montherrors{:,:},[],1)
stdev = 1×3
0.9951 0.9624 0.7766

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by