Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

poly

Define Polynomial by Roots


Description

Define a polynomial by its roots.

Usage

Poly(x)

Arguments

x

vector or square matrix, real or complex

Details

Computes the characteristic polynomial of an (n x n)-Matrix.

If x is a vector, Poly(x) is the vector of coefficients of the polynomial whose roots are the elements of x.

Value

Vector representing a polynomial.

Note

In Matlab/Octave this function is called poly().

See Also

Examples

Poly(c(1, -1, 1i, -1i))  # Solves x^4 -1 = 0
  # Wilkinson's example:
  roots(Poly(1:20))

pracma

Practical Numerical Math Functions

v2.3.3
GPL (>= 3)
Authors
Hans W. Borchers [aut, cre]
Initial release
2021-01-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.