/ Home
S-Archive Download Script
polycoef Coefficients of a Polynomial
DESCRIPTION
Returns the coefficients of a polynomial.
 
USAGE
polycoef(x)
 
VALUE
Produces a vector whose elements are the coefficients of the polynomial whose roots are the elements of x.
 
DETAILS
polycoef is the inverse of the built-in S-Plus function polyroot, up to ordering, scaling, and roundoff error. NA's and Inf's in x are ignored.
 
EXAMPLES
> polycoef(c(1,1))
[1] 1 -2 1
> polyroot(polycoef(c(1,1)))
[1] 1+0i 1+0i

 

S-Archive Download Script

Gordon Smyth. Copyright © 1996-2016. Last modified: 10 February 2004