Roots
The roots function calculates
the roots of a polynomial:
r = roots(p)
r =
2.0946
-1.0473 + 1.1359i
-1.0473 - 1.1359i
By convention, the MATLAB software stores roots in column
vectors. The function poly returns
to the polynomial coefficients:
p2 = poly(r)
p2 =
1 8.8818e-16 -2 -5
poly and roots are inverse
functions, up to ordering, scaling, and roundoff error.
 | Evaluating Polynomials | | Derivatives |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit