mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
726 B
726 B
Function median
Compute the median of a list of values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned. Supported types of values are: Number, BigNumber, Unit
In case of a (multi dimensional) array or matrix, the median of all elements will be calculated.
median(a, b, c, ...) median(A)
Parameters
| Parameter | Type | Description |
|---|---|---|
args |
... * | A single matrix or or multiple scalar values |
Returns
| Type | Description |
|---|
- | res