avr

From STX Wiki
< Programmer Guide‎ | Command Reference‎ | EVAL
Revision as of 17:31, 18 November 2010 by Admin (talk | contribs) (1 revision: Initial import)
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