Standard deviation of columns of a table

3 Ansichten (letzte 30 Tage)
Wietze Zijpp
Wietze Zijpp am 4 Apr. 2022
Beantwortet: Voss am 4 Apr. 2022
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

Akzeptierte Antwort

Voss
Voss am 4 Apr. 2022
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

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by