Matlab daily Practice Poly Function _matlab Learning

Source: Internet
Author: User

Poly to find the characteristic polynomial of a matrix

>> a=[0 1 0;-4 4 0;-2 1 2]

A =

0 1 0
-4 4 0
-2 1 2

>> Poly (A)

Ans =

1-6 12-8

>> B=sym (A)

B =

[0, 1, 0]
[-4, 4, 0]
[-2, 1, 2]

>> Poly (B)

Ans =

X^3-6*x^2 + 12*x-8

POLY Convert roots to polynomial.
    POLY (a), when a was an n by n matrix, being a row vector with
    n+1 Elementswhich Are the coefficients of the
   characteristic polynomial, DET (Lambda*eye (SIZE (a))-A).
 
    POLY (v), when v are a vector, is a vector whose elements are
    thecoefficients of The polynomial whose roots are the
    elements OfV. For vectors, ROOTS and POLY are inverse
    functions Ofeach, up to ordering, scaling, and
&N bsp;   Roundofferror.
 
   roots (POLY (1:20)) generates Wilkinson ' s famous example.
 
  & nbsp Classsupport for inputs a,v:
      float:double, single
 
     Alsoroots, conv, residue, polyval.

Overloaded methods:
Sym/poly

Referencepage in Help browser
Doc Poly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.