| Statistics Toolbox | Search  Help Desk |
| mean | Examples See Also |
Average or mean value of vectors and matrices.
Syntax
m = mean(X)
Description
mean calculates the sample average. 
mean(x) is the mean value of the elements in vector x. For matrices, mean(X) is a row vector containing the mean value of each column.
Example
These commands generate five samples of 100 normal random numbers with mean, zero, and standard deviation, one. The sample averages in xbar are much less variable (0.00 ± 0.10).x = normrnd(0,1,100,5); xbar = mean(x) xbar =
See Also
median, std, cov, corrcoef, var
mean is a function in the MATLAB Toolbox.