Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Polynomial roots

- example
`r = roots(p)`

`r = roots(`

returns
the roots of the polynomial represented by `p`

)`p`

as
a column vector. Input `p`

is a vector containing `n+1`

polynomial
coefficients, starting with the coefficient of *x*^{n}.
A coefficient of `0`

indicates an intermediate power
that is not present in the equation. For example, ```
p = [3
2 -2]
```

represents the polynomial $$3{x}^{2}+2x-2$$.

The `roots`

function solves polynomial equations
of the form $${p}_{1}{x}^{n}+\mathrm{...}+{p}_{n}x+{p}_{n+1}=0$$.
Polynomial equations contain a single variable with nonnegative exponents.

Was this topic helpful?