MATLAB: How to do SEM Error Bars

meansemstd

I know how to find the standard deviation with error bars but how do I find the standard error mean of variables?

Best Answer

You have to know the number of observations that went into calculating each standard deviation.
Assuming ‘x’ is a vector:
SEM = std(x)/sqrt(length(x));