现在的位置: 首页 > 综合 > 正文

matlab每日练习poly函数

2014年01月20日 ⁄ 综合 ⁄ 共 797字 ⁄ 字号 评论关闭

 poly用来求矩阵的特征多项式

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

A =

          0
   -4       0
   -2       2

>> poly(A)

ans =

      -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 is an N by N matrix, is a row vector with
    N+1 elementswhich are the coefficients of the
   characteristic polynomial, DET(lambda*EYE(SIZE(A)) - A) .
 
    POLY(V),when V is 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 other, up to ordering, scaling, and
    roundofferror.
 
   ROOTS(POLY(1:20)) generates Wilkinson's famous example.
 
    Classsupport for inputs A,V:
      float: double, single
 
    See alsoroots, conv, residue, polyval.

   Overloaded methods:
      sym/poly

    Referencepage in Help browser
      doc poly

抱歉!评论已关闭.