Released v3.8.1

This commit is contained in:
jos 2016-12-15 21:07:26 +01:00
parent 8015698d71
commit 29da2b0418
13 changed files with 851 additions and 686 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
{
"name": "mathjs",
"version": "3.8.0",
"version": "3.8.1",
"main": "./dist/math.min.js",
"license": "Apache-2.0",
"ignore": [

View File

@ -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

File diff suppressed because it is too large Load Diff

2
dist/math.map vendored

File diff suppressed because one or more lines are too long

24
dist/math.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -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.

View 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 &#124; 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)

View 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'
]
};

View File

@ -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');

View File

@ -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.

View File

@ -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.

View File

@ -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": [