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
Examples
Get 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
- Search Lucee Test Cases (good for further, detailed examples)