mad.md (914B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 2 3 # Function mad 4 5 Compute the median absolute deviation of a matrix or a list with values. 6 The median absolute deviation is defined as the median of the absolute 7 deviations from the median. 8 9 10 ## Syntax 11 12 ```js 13 math.mad(a, b, c, ...) 14 math.mad(A) 15 ``` 16 17 ### Parameters 18 19 Parameter | Type | Description 20 --------- | ---- | ----------- 21 `array` | Array | Matrix | A single matrix or multiple scalar values. 22 23 ### Returns 24 25 Type | Description 26 ---- | ----------- 27 * | The median absolute deviation. 28 29 30 ### Throws 31 32 Type | Description 33 ---- | ----------- 34 35 36 ## Examples 37 38 ```js 39 math.mad(10, 20, 30) // returns 10 40 math.mad([1, 2, 3]) // returns 1 41 math.mad([[1, 2, 3], [4, 5, 6]]) // returns 1.5 42 ``` 43 44 45 ## See also 46 47 [median](median.md), 48 [mean](mean.md), 49 [std](std.md), 50 [abs](abs.md)