avr

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 14:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
avr

Compute the arithmetic average.

Usage:

avr(x)

Function:

Compute the arithmetic average of all elements in x.

Result:

The arithmetic average of all the elements.

Return Type:

scalar

Usage:

avr(x, flag)

Function:

Compute the arithmetic average of each column or row of the matrix x.

Parameters:
x
A matrix.
flag
A flag determining whether the returned vector contains elements of the averaged column i (type=0) or averaged row i (type=1).
Result:

A vector with ncol(x) or nrow(x) elements.

Return Type:

vector

Navigation menu

Personal tools