MATLAB Function Reference Previous page   Next Page
median

Median value of arrays

Syntax

Description

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

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

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

If A is a multidimensional array, median(A) treats the values along the first nonsingleton dimension as vectors, returning an array of median values.

M = median(A,dim) returns the median values for elements along the dimension of A specified by scalar dim.

Examples

See Also

corrcoef, cov, max, mean, min, std, var


Previous page  mean memmapfile Next page

© 1994-2005 The MathWorks, Inc.