mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.3 KiB
1.3 KiB
| layout |
|---|
| default |
Function mad #
Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.
Syntax #
math.mad(a, b, c, ...)
math.mad(A)
Parameters #
| Parameter | Type | Description |
|---|---|---|
array |
Array | Matrix | A single matrix or multiple scalar values. |
Returns #
| Type | Description |
|---|
- | The median absolute deviation.
Examples #
math.mad(10, 20, 30) // returns 10
math.mad([1, 2, 3]) // returns 1
math.mad([[1, 2, 3], [4, 5, 6]]) // returns 1.5