Difference between revisions of "TEAMedian"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function TEAMedian(const TEA: TExtArray): Extended; </source> ==Availability== SCAR Divi 3.38 > Current ==Description== Ret...") |
(No difference)
|
Revision as of 16:22, 12 December 2012
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