Statistics Toolbox
  Go to function:
    Search    Help Desk 
mean    Examples   See Also

Average or mean value of vectors and matrices.

Syntax

Description

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

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

mean is a function in the MATLAB Toolbox.



[ Previous | Help Desk | Next ]