ROOT2POLY Function
Forms a polynomial from a given set of roots.
Usage
result = ROOT2POLY(r)
Input Parameters
r—A one-dimensional array or scalar containing the polynomial roots.
Returned Value
result—A one-dimensional array containing the coefficients of the polynomial.
Keywords
None.
Discussion
Given a set of roots r0, r1, r2, ..., rN, ROOT2POLY determines the coefficients of the polynomial A(x) where A(x) is given by:
                                           = a0 + a1x + a2x2 + ... + aNxN  , aN = 1
ROOT2POLY always returns a polynomial with aN normalized to 1.
Example
In this example, ZEROPOLY is used to first compute the roots of the polynomial A(x) given by
A(x) = 3 + 2x + 12x2 + 4x3 + x4
ROOT2POLY is then used to reproduce A(x) from its roots.
A = [3, 2, 12, 4, 1]
r = ZEROPOLY(A)
PM, ROOT2POLY(r), Format = '(f10.1)'
; 3.0
; 2.0
; 12.0
; 4.0
; 1.0
See Also