Difference between revisions of "TIAMean"
From SCAR Divi Manual
| (2 intermediate revisions by the same user not shown) | |||
| Line 6: | Line 6: | ||
==Availability== | ==Availability== | ||
SCAR Divi 3.28 > Current | SCAR Divi 3.28 > Current | ||
| + | |||
| + | ===Notes=== | ||
| + | *Before 3.38, the function returned 0 when '''TIA''' was empty. | ||
==Description== | ==Description== | ||
| − | Returns the arithmetic mean of the [[Integer|integer]] values in the given [[TIntArray]] '''TIA'''. | + | Returns the [http://mathworld.wolfram.com/ArithmeticMean.html arithmetic mean] of the [[Integer|integer]] values in the given [[TIntArray]] '''TIA'''. Throws an exception if '''TIA''' is empty. |
==Example== | ==Example== | ||
| Line 23: | Line 26: | ||
Output: | Output: | ||
3 | 3 | ||
| + | |||
| + | ==See Also== | ||
| + | *[[TIAMedian]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
Latest revision as of 15:47, 12 December 2012
Definition
function TIAMean(const TIA: TIntArray): Extended;
Availability
SCAR Divi 3.28 > Current
Notes
- Before 3.38, the function returned 0 when TIA was empty.
Description
Returns the arithmetic mean of the integer values in the given TIntArray TIA. Throws an exception if TIA is empty.
Example
var TIA: TIntArray; begin TIA := [1, 1, 5, 5]; WriteLn(TIAMean(TIA)); end.
Output:
3