Poly | R Documentation |
Define a polynomial by its roots.
Poly(x)
x |
vector or square matrix, real or complex |
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
.
Vector representing a polynomial.
In Matlab/Octave this function is called poly()
.
polyval
, roots
Poly(c(1, -1, 1i, -1i)) # Solves x^4 -1 = 0
# Wilkinson's example:
roots(Poly(1:20))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.