Rev Language Reference


mean - Mean of a vector of numbers

Finds the arithmetic mean of a vector of numbers.

Usage

mean(Real[] x)

Arguments

x : Real[] (pass by const reference)
A vector of numbers.

Return Type

Details

The numbers of the vector are summed and divided by the vector length.

Example

g = v(2,3,5,6,7)
mean(g)
# 4.6