Documentation Center

  • Trial Software
  • Product Updates
我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Roots of Polynomials

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.

Was this topic helpful?