mathjs
Version:
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.
23 lines (22 loc) • 499 B
JavaScript
module.exports = {
'name': 'median',
'category': 'Statistics',
'syntax': [
'median(a, b, c, ...)',
'median(A)'
],
'description': 'Compute the median of all 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.',
'examples': [
'median(4, 2, 7)',
'median([3, -1, 5, 7])'
],
'seealso': [
'max',
'mean',
'min',
'prod',
'std',
'sum',
'var'
]
};