Two outputs when calculating standard error of mean, WHY?
10 views (last 30 days)
Daniel M on 7 Nov 2019
Edited: Daniel M on 7 Nov 2019
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)).