Evaluates a polynomial at given locations. |
|||
Syntax |
v = PolyVal(c,x) |
||
Arguments |
Name |
Description |
|
c |
A vector of the coefficients of the polynomial in descending order of power. |
||
x |
A scalar or vector of values where the polynomial is evaluated. |
||
Output |
Name |
Description |
|
v |
A scalar or vector of the polynomial values at the entries of x. |
||
Example |
Find the values of x2 – 3x + 2 at its roots [2.0, 1.0] |
||
Syntax |
|||
|
|||
Result |
|||
V = 0.0 0.0 |
|||
Comments |
A non-zero imaginary part indicates a non-existent root. |
||
See Also: |