ATLAB Lecture 6 School of Mathematical Sciences Xiamen University http∥gdjpkc.xmu.edu.cr compute the product of (x+2)(2x-1) 2*x^3+4*x^2-X Division( Correspond to the operations convolution and deconvolution >>a, r=decon(c, a) %dividing c by a is quotient q and remainder r Y Polynomial Derivatives q= polder(p) %computes the derivative of polynomial (x'-2x-5) >>a=[135: b=[246;c=polyder(a, b) %computes the derivative of the Ict of two polynomials [(x+3x+5)(2x+4x+6] 8305638 >>[q, d]= polyder(a, b) %computes the derivative of the quotient of two polynomial (x2+3x+5)_q(x) (2x2+4x+6)」d(x) 4164 t *Partial Fraction Expansion residue finds the partial fraction expansion of the ratio of two polynomials. This is particularly useful for applications that represent systems in transfer function form. For polynomials b and a, if there are no multiple roots b(x) P1 x- p2 P where r is a column vector of residues, p is a column vector of pole locations, and k is a row vector of direct terms >>b=[-48: a=[168[, p, k]=residue(b, a)% x2+6x+8x+4x+2MATLAB Lecture 6 School of Mathematical Sciences Xiamen University http://gdjpkc.xmu.edu.cn Lec63 % compute the product of 2 (x + 2)(2x -1) ans = 2*x^3+4*x^2x2 Division (Correspond to the operations convolution and deconvolution) >> [q, r] = deconv(c, a) %dividing c by a is quotient q and remainder r q = 2 0 1 r = 0 0 0 0 ² Polynomial Derivatives >> q = polyder(p) %computes the derivative of polynomial 3 (x - 2x - 5)¢ q = 3 0 2 >> a = [1 3 5]; b = [2 4 6]; c = polyder(a,b) %computes the derivative of the … product of two polynomials 2 2 [(x + 3x + 5)(2x + 4x + 6)]¢ c = 8 30 56 38 >> [q,d] = polyder(a,b) %computes the derivative of the quotient of two polynomials… 2 2 ( 3 5) ( ) (2 4 6) ( ) x x q x x x d x ¢ È + + ˘ = Í ˙ + + Î ˚ q = 2 8 2 d = 4 16 40 48 36 ² *Partial Fraction Expansion residue finds the partial fraction expansion of the ratio of two polynomials. This is particularly useful for applications that represent systems in transfer function form. For polynomials b and a, if there are no multiple roots, 1 2 1 2 ( ) ... ( ) n s n b x r r r k a x x p x p x p = + + + + - - - where r is a column vector of residues, p is a column vector of pole locations, and k is a row vector of direct terms. >> b = [4 8]; a = [1 6 8]; [r, p, k] = residue(b, a) % 2 4 8 12 8 6 8 4 2 x x x x x - - - = + + + + + r = 12 8