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

Median value of vectors and matrices.

Syntax

Description

median(X) calculates the median value, which is the 50th percentile of a sample. The median is a robust estimate of the center of a sample of data, since outliers have little effect on it.

For vectors, median(x) is the median value of the elements in vector x. For matrices, median(X) is a row vector containing the median value of each column. Since median is implemented using sort, it can be costly for large matrices.

Examples

This example shows robustness of the median to outliers.

See Also

mean, std, cov, corrcoef

median is a function in MATLAB.



[ Previous | Help Desk | Next ]