roots: Polynomial Roots

Description Usage Arguments Details Value See Also Examples

Description

Computes the roots of the polynomial p.

Usage

1
  roots(p)

Arguments

p

vector of real numbers representing the polynomial

Details

For solution the function computes the eigenvalues of the companion matrix.

At the moment, only real coefficients are allowed.

Value

a vector holding the roots of the polynomial

See Also

polyroot

Examples

1
2
3
  roots(c(1, 0, 1, 0, 0))       # 0 0 1i -1i
  p <- Poly(c(-2, -1, 0, 1, 2))
  roots(p)


Search within the pracma package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.