function avg

Returns the average value of X, optionally omitting a value. Undefined values (INF and NaN) are ignored.

Syntax
result = avg(X [, omit])

Arguments
X:   A matrix.
omit:   A value to be omitted when taking the average.


Examples
Find the average of the values 0,1,2,3,4 (which is 2):
   print avg([0:4])

See also
function max function min function total function median function stddev function meddev