mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
Released v3.8.1
This commit is contained in:
parent
8015698d71
commit
29da2b0418
@ -1,7 +1,7 @@
|
||||
# History
|
||||
|
||||
|
||||
## not yet released, version 3.8.1
|
||||
## 2016-12-15, version 3.8.1
|
||||
|
||||
- Implemented function `mad` (median absolute deviation). Thanks @ruhleder.
|
||||
- Fixed #762: expression parser failing to invoke a function returned
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mathjs",
|
||||
"version": "3.8.0",
|
||||
"version": "3.8.1",
|
||||
"main": "./dist/math.min.js",
|
||||
"license": "Apache-2.0",
|
||||
"ignore": [
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mathjs",
|
||||
"version": "3.8.0",
|
||||
"version": "3.8.1",
|
||||
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.",
|
||||
"repo": "josdejong/mathjs",
|
||||
"main": "dist/math.min.js",
|
||||
|
||||
1433
dist/math.js
vendored
1433
dist/math.js
vendored
File diff suppressed because it is too large
Load Diff
2
dist/math.map
vendored
2
dist/math.map
vendored
File diff suppressed because one or more lines are too long
24
dist/math.min.js
vendored
24
dist/math.min.js
vendored
File diff suppressed because one or more lines are too long
@ -191,6 +191,7 @@ Function | Description
|
||||
|
||||
Function | Description
|
||||
---- | -----------
|
||||
[math.mad(a, b, c, ...)](functions/mad.md) | Compute the median absolute deviation of a matrix or a list with values.
|
||||
[math.max(a, b, c, ...)](functions/max.md) | Compute the maximum value of a matrix or a list with values.
|
||||
[math.mean(a, b, c, ...)](functions/mean.md) | Compute the mean value of matrix or a list with values.
|
||||
[math.median(a, b, c, ...)](functions/median.md) | Compute the median of a matrix or a list with values.
|
||||
|
||||
44
docs/reference/functions/mad.md
Normal file
44
docs/reference/functions/mad.md
Normal file
@ -0,0 +1,44 @@
|
||||
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
|
||||
|
||||
# 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
|
||||
|
||||
```js
|
||||
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
|
||||
|
||||
```js
|
||||
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
|
||||
```
|
||||
|
||||
|
||||
## See also
|
||||
|
||||
[median](median.md),
|
||||
[mean](mean.md),
|
||||
[std](std.md),
|
||||
[abs](abs.md)
|
||||
20
lib/expression/docs/function/statistics/mad.js
Normal file
20
lib/expression/docs/function/statistics/mad.js
Normal file
@ -0,0 +1,20 @@
|
||||
module.exports = {
|
||||
'name': 'mad',
|
||||
'category': 'Statistics',
|
||||
'syntax': [
|
||||
'mad(a, b, c, ...)',
|
||||
'mad(A)'
|
||||
],
|
||||
'description': '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.',
|
||||
'examples': [
|
||||
'mad(10, 20, 30)',
|
||||
'mad([1, 2, 3])',
|
||||
'mad(10, 20, 30)'
|
||||
],
|
||||
'seealso': [
|
||||
'mean',
|
||||
'median',
|
||||
'std',
|
||||
'abs'
|
||||
]
|
||||
};
|
||||
@ -226,6 +226,7 @@ function factory (construction, config, load, typed) {
|
||||
docs.erf = require('./function/special/erf');
|
||||
|
||||
// functions - statistics
|
||||
docs.mad = require('./function/statistics/mad');
|
||||
docs.max = require('./function/statistics/max');
|
||||
docs.mean = require('./function/statistics/mean');
|
||||
docs.median = require('./function/statistics/median');
|
||||
|
||||
@ -26,7 +26,7 @@ function factory (type, config, load, typed) {
|
||||
*
|
||||
* See also:
|
||||
*
|
||||
* median, abs, map, subtract
|
||||
* median, mean, std, abs
|
||||
*
|
||||
* @param {Array | Matrix} array
|
||||
* A single matrix or multiple scalar values.
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
module.exports = '3.8.0';
|
||||
module.exports = '3.8.1';
|
||||
// Note: This file is automatically generated when building math.js.
|
||||
// Changes made in this file will be overwritten.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mathjs",
|
||||
"version": "3.8.0",
|
||||
"version": "3.8.1",
|
||||
"description": "Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.",
|
||||
"author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
|
||||
"contributors": [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user