avr
From STX Wiki
< Programmer Guide | Command Reference | EVAL
Jump to navigationJump to search
Contents
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 rowi
(type=1
).
Result:
A vector with ncol(
x)
or nrow(
x)
elements.
Return Type:
vector