FUNCTION REFERENCE
median
Median value.
Median value.
Syntax
median(A)Syntax
median(A, dim)Syntax
median(A, 'all', 'omitnan')dim is a positive integer or 'all'. 'omitnan' or 'includenan' may follow.
Example
median([3 1 2]) % 2Differences from MATLAB: Real and complex double arrays. Logical input, weights and vecdim are not supported. Complex values order by abs, then angle in (-pi, pi], NaN last; a lane with NaN gives NaN.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.