Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

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.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS