MATLAB Function Reference
  Go to function:
    Search    Help Desk 
mean    Examples   See Also

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.

Examples

See Also

corrcoef    Correlation coefficients

cov         Covariance matrix

max         Maximum elements of an array

median      Median value of arrays

min         Minimum elements of an array

std         Standard deviation



[ Previous | Help Desk | Next ]