Programmer Guide/Command Reference/EVAL/avr: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
m (1 revision: Initial import)

Revision as of 17:31, 18 November 2010

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