TEAMedian
From SCAR Divi Manual
Contents
Definition
function TEAMedian(const TEA: TExtArray): Extended;
Availability
SCAR Divi 3.38 > Current
Description
Returns the statistical median of the extended values in the given TExtArray TEA. Throws an exception if TEA is empty.
Examples
Example 1
var TEA: TExtArray; begin TEA := [1.1, 1.2, 4.3, 5.4, 5.5]; WriteLn(TEAMedian(TEA)); end.
Output:
4.3
Example 2
var TEA: TExtArray; begin TEA := [1.1, 1.2, 4.3, 5.4]; WriteLn(TEAMedian(TEA)); end.
Output:
2.75