MATLAB Lecture 6 School of Mathematical Sciences Xiamen University http∥gdjpkc.xmu.edu.cr MATLAB Lecture 6-Polynomial 多项式 Ref: MATLAB-Mathematics-Polynomials and Interpolation Vocabulary: polynomial多项式 root根 arithmetic operation算术运算 multiply乘法 divide除法 derivative导数 differentiation微分法 求值 action 部分分式 展开 convolution卷积 product乘积 deconvolution去卷积 quotient商 remainder余项 multiple roots重根 direct直接的 term transfer function转换函数,传递函数 ● Some functions conv decon poly polyder polyval polyvalm roots *residue polyfit Y Representing Poly nomials MATLAB represents polynomials as row vectors containing coefficients ordered descending powers >>p=[10-2-5] %represents x'-2x-5 >> sym p= poly 2sym(p) represents a polynomial in sym form sym p- X^3-2*x-5 ☆ Create polynomials >>p=[10-2-5 % represents a polynomail x'-2x-5 0 >>r=[0, 1, -1]; poly(r) %generate a polynomial x(x-D(x+1), whose roots are 0, 1,-1 >>a=[12: 3 4; poly(a) generate the characteristic polynomials of matrix Lec6-IMATLAB Lecture 6 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu.cn Lec61 MATLAB Lecture 6 – Polynomial 多项式 Ref: MATLAB→Mathematics→Polynomials and Interpolation l Vocabulary: polynomial 多项式 root 根 arithmetic operation 算术运算 multiply 乘法 divide 除法 derivative 导数 differentiation 微分法 evaluation 求值 partialfraction 部分分式 expansion 展开 convolution 卷积 product 乘积 deconvolution 去卷积 quotient 商 remainder 余项 multiple roots 重根 direct 直接的 term 项 transfer function 转换函数,传递函数 l Some functions conv deconv poly polyder polyval polyvalm roots * residue * polyfit l Polynomials ² Representing Polynomials MATLAB represents polynomials as row vectors containing coefficients ordered by descending powers. >> p = [1 0 2 5]; % represents 3 x - 2x -5 p = 1 0 2 5 >> sym_p = poly2sym(p) % represents a polynomial in sym form sym_p = x^32*x5 ² Create Polynomials >> p = [1 0 2 5] % represents a polynomail 3 x - 2x -5 p = 1 0 2 5 >> r = [0, 1, 1]; poly(r) %generate a polynomial x(x -1)(x +1) ,whose roots are 0,1,1 ans = 1 0 1 0 >> a = [1 2; 3 4]; poly(a) % generate the characteristic polynomials of matrix… 1 2 3 4 l l Ê - - ˆ Á ˜ Ë - - ¯ , i.e. 2 1 2 5 2 3 4 l l l l - - = - - - -