|
Calculates aggregate values (total, average, maximum, minimum).
syntax
Math.Summary(
type,
value1
[,value2]
[,value3]
...
[,valueX]
)
Parameters
type
|
|
Type:
|
character
|
|
The type of aggregate value you want
"sum" - Sum value
"ave" - average value
"max" - maximum value
"min" - The minimum value
|
value[x]
|
|
Type:
|
Number
|
|
Source data. Can be specified as an array. Arguments can also be listed at the end. (There is no limit to the number of arguments that can be listed.)
|
Return Value
|
|
Type:
|
Number
|
|
The result value.
|
Example
Here is the sum of 1 to 5:
|
var vSum = Math.Summary ("sum", 1, 2, 3, 4, 5);
|
Here is the average from 1 to 10:
|
var vAve = Math.Summary ("ave", c(1, 2, 3, 4, 5), 6, 7, c(8, 9, 10));
|
|
Supported
reference
Math.Abs
Math.Ceil
Math.Floor
Math.Ave
Math.Sum
Math.Max
Math.Min
Math.Median
Math.Mode
Math.Random
Math.Log
Math.Log10
Math.Pow
Math.Sqrt
Math.Nthroots
Math.AddingUp
Math.StDev
Math.Correl
Math.LineSt
Math.Sin
Math.Cos
Math.Tan
Math.Asin
Math.Acos
Math.Atan
Math.Exp
Math.LinearTrans (Math.LT)
Math.PowerFactorTrans (Math.PT)
Math.Summary
Math.Round
|