Using mathematical functions 171
Matrix functions
These functions are for matrix data stored in matrix
variables. See the chapter Matrices for details.
Polynomial functions
Polynomials are products of constants (coefficients) and
variables raised to powers (terms).
POLYCOEF Polynomial coefficients. Returns the coefficients of the
polynomial with the specified roots.
POLYCOEF ([roots])
Example:
To find the polynomial with roots 2, –3, 4, –5:
POLYCOEF([2,-3,4,-5]) returns[1,2,-25,
-26,120], representing x
4
+2x
3
–25x
2
–26x+120.
POLYEVAL Polynomial evaluation. Evaluates a polynomial with the
specified coefficients for the value of x.
POLYEVAL([coefficients], value)
Example:
For x
4
+2x
3
–25x
2
–26x+120:
POLYEVAL([1,2,-25,-26,120],8) returns
3432.
POLYROOT Polynomial roots. Returns the roots for the nth-order
polynomial with the specified n+1 coefficients.
POLYROOT([coefficients])
Example:
For x
4
+2x
3
–25x
2
–26x+120:
POLYROOT([1,2,-25,-26,120]) returns
[4,-5,-3,2].