| Prev | Next | colrms |
| Syntax |
y = colrms(x) |
| Include: |
include spt\colrms.oms |
| See Also |
ARGUMENTS:
INPUTS:
x = MATRIX, any numerical type.
RETURN: VECTOR, column-wise rms value.
Returns a row vector with the column-wise Root-Mean-Square
value of input matrix. Each element of the returned vector
is the square root of the average of the norm squared for the
corresponding column of the input matrix. Output is of same
type as input except for INTEGER input which is coerced to
DOUBLE before processing. COMPLEX inputs are converted to
their ABSOLUTE VALUE before being averaged; type DOUBLE is
returned.
For vectors:
O>x = {-1.0, 0, 1, 2, 3}
O>x
{
-1
0
1
2
3
}
O>colrms(x)
1.73205
For matrices:
O>A = {[-5, 3.0],[0,4]}
O>A
{
[ -5 , 3 ]
[ 0 , 4 ]
}
O>colrms(A)
[ 3.53553 , 3.53553 ]