Difference between revisions of "TIAMedian"
From SCAR Divi Manual
(Created page with "==Definition== <source lang="scar" lines="false"> function TIAMedian(const TIA: TIntArray): Extended; </source> ==Availability== SCAR Divi 3.38 > Current ==Description== Ret...") |
(No difference)
|
Revision as of 16:19, 12 December 2012
Contents
Definition
function TIAMedian(const TIA: TIntArray): Extended;
Availability
SCAR Divi 3.38 > Current
Description
Returns the statistical median of the integer values in the given TIntArray TIA. Throws an exception if TIA is empty.
Examples
Example 1
var TIA: TIntArray; begin TIA := [1, 1, 4, 5, 5]; WriteLn(TIAMedian(TIA)); end.
Output:
4
Example 2
var TIA: TIntArray; begin TIA := [1, 1, 4, 5]; WriteLn(TIAMedian(TIA)); end.
Output:
2.5