Statistics Toolbox    
mean

Average or mean value of vectors and matrices

Syntax

Description

m = mean(X) calculates the sample average

For vectors, 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.

The mean function is part of the standard MATLAB language.

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).

See Also
median, std, cov, corrcoef, var


  manovacluster median