medianSample median
Sample median is the "middle point" of a given set of data. It divides the data into 2 sub-groups of same number of elements. Let
If
m = median(A)A is a scalar, m is equal to A.A is a vector, m is the median of elements along the longer dimension of A.A is a matrix or multi-dimensional array, m contains medians of vectors of A along the first non-singleton dimension.A is empty, m is NaN.m = median(A, dim)m = median(A) above, except that elements of m contains medians of vectors of A along its dim-th dimension.dim should be a real integer scalar