|
Contents | Previous | Next | Subchapters |
| Syntax |
polval(p, x) |
| See Also | polyval , pol2asc , zero2pol |
2 n-1
p[x ] = p + p x + p x + . . . + p x
i,j 1 2 i,j 3 i,j n i,j
where n is the length of the vector p.
The integer, real, double-precision, or complex column vector
p specifies the polynomial to be evaluated.
The integer, real, double-precision, or complex matrix
x specifies the points at which to evaluate 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, 0, 1}
x = -2. : .1 : +2.
v = polval(p, x)
gplot(x, v)
returns the following plot: