|
Contents | Previous | Next | Subchapters |
| Syntax |
polyvalm(p, x) |
| See Also | polyval , polval |
n-1 1 0
p[x] = p x + ... + p x + p x
1 n-1 n
where n is the length of the vector p and
0 i+1 i
x = I and for i = 2, ... , n-1, x = x * x
where * denotes matrix multiplication and I
denotes the identity matrix with same dimensions as x.
The integer, real, double-precision, or complex vector
p specifies the polynomial to be evaluated.
The integer, real, double-precision, or complex matrix
x specifies the argument to the polynomial.
The return matrix has the same dimension as x
and the same type as a binary operation between p and x.
(See the coercion
entry in the O-Matrix User's Guide.)
p = [1, 1, 1]
x = { ...
[ 1 , -1 ], ...
[ 0 , 1 ] ...
}
polyvalm(p, x)
O-Matrix will reply
{
[ 3 , -3 ]
[ 0 , 3 ]
}
If you continue by entering
x * x + x + identity(2)
O-Matrix will reply
{
[ 3 , -3 ]
[ 0 , 3 ]
}