Two outputs when calculating standard error of mean, WHY?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I am calculating the standard error of the mean and I am getting two ouput. I do not understand why. The code is:
SEM_A = std(A,[])./ sqrt(size(A))
And my output is:
SEM_A =
0.0048 0.1290
Do You have any ideas?
:)
0 件のコメント
採用された回答
Daniel M
2019 年 11 月 7 日
編集済み: Daniel M
2019 年 11 月 7 日
It's because size(A) returns two outputs. If you want to use the size of A in a particular dimension, use size(A,dim). (Since size operates columnwise, it's likely only dim=2 would make sense). If you want to divide by the total number of elements in A, use numel(A). If A is a vector then numel(A) is the same as length(A), which is the same as max(size(A)).
3 件のコメント
Daniel M
2019 年 11 月 7 日
Again it is the difference between the output of length(A) and size(A,2). I can't tell you which one is correct.
I also can't tell you how else to analyze/report your data, because I don't know what they are, how they were measured, underlying assumptions, statistical distributions, systematic errors and uncertainty, etc.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!