Function Reference
— Function File: mean (x, dim, opt)

If x is a vector, compute the mean of the elements of x If x is a matrix, compute the mean for each column and return them in a row vector.

With the optional argument opt, the kind of mean computed can be selected. The following options are recognized:

"a"
Compute the (ordinary) arithmetic mean. This is the default.
"g"
Compute the geometric mean.
"h"
Compute the harmonic mean.

If the optional argument dim is supplied, work along dimension dim.

Both dim and opt are optional. If both are supplied, either may appear first.