ArrayMedian()
Calculates the Median value of items in an array.
All elements in the array must contain values that can be converted to numeric.
ArrayMedian( array=array );
Returns: Number
| Argument | Description |
|---|---|
|
array
array,
required
|
edit
The array of which to calculate the Median value |
Examples
editGet the median value in the array
aNames = array(10412,42,33,2,999,12769,888);
dump(arrayMedian(aNames));
//member function
dump(aNames.median());
See also
- Arrays
- Math
- array.median()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)