MATLAB Function Reference Previous page   Next Page
mean

Average or mean value of arrays

Syntax

Description

M = mean(A) returns the mean values of the elements along different dimensions of an array.

If A is a vector, mean(A) returns the mean value of A.

If A is a matrix, mean(A) treats the columns of A as vectors, returning a row vector of mean values.

If A is a multidimensional array, mean(A) treats the values along the first non-singleton dimension as vectors, returning an array of mean values.

M = mean(A,dim) returns the mean values for elements along the dimension of A specified by scalar dim. For matrices, mean(A,2) is a column vector containing the mean value of each row.

Examples

See Also

corrcoef, cov, max, median, min, std, var


Previous page  max median Next page

© 1994-2005 The MathWorks, Inc.