## 7-1 多?式???乘除

@ n hiHܦ

$$p(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_1 x + a_0$$

]b MATLAB AiHΤ@Ӫ׬ n+1 CVqӪܦh $p(x)$ pUG

$$p = [a_n, a_{n-1}, \cdots, a_1, a_0]$$

|ҨӻAڭ̥i p = [1, 2, 3, 1] Ӫܤ@ӤTh $p(x) = x^3 + 2 x^2 + 3 x + 1$C

h[AiѦVq[ӱXCYhOO $p_1(x) = x^3+x+1$ $p_2(x)= x^2-x+2$AhMPtippUG

Example 1: 07-hBzPR/polyPlus.mp1 = [1,0,1,1]; p2 = [0,1,-1,2]; p1 + p2 p1 - p2ans = 1 1 0 3 ans = 1 -1 2 -1

`NOGx} p1 P p2 ׭n@PA_h MATLAB N|͹B~TC

hPAiϥ conv deconv OӹFAҦpADh $p_1(x)$ P $p_2(x)$ nAiJpUG

Example 2: 07-hBzPR/conv01.mp1 = [1, 0, 1, 1]; p2 = [0, 1, -1, 2]; p3 = conv(p1, p2)p3 = 0 1 -1 3 0 1 2

WҤ p1 P p2 hnGO p3AYHhܪkAY $p_3(x) = x^5-x^4+3x^2-x+2$C

YD $p_1(x)$ H $p_2(x)$ ұoӦPlAiJG

Example 3: 07-hBzPR/deconv01.mp1 = [1, 0, 1, 1]; p2 = [1, -1, 2]; [q, r] = deconv(p1, p2)q = 1 1 r = 0 0 0 -1

YN $p_1(x)$ H $p_2(x)$ Ao쪺Ӧ $q(x)=x+1$Al $r(x)=-1$C

HUCXpϥ MATLAB Ӷih[G

p1 + p2 h $p_1(x)$ P $p_2(x)$ M
p1 - p2 h $p_1(x)$ P $p_2(x)$ t
conv(p1, p2) h $p_1(x)$ P $p_2(x)$ n
[q, r] = deconv(p1, p2) h $p_1(x)$ H $p_2(x)$ AoӦ $q(x)$Al $r(x)$
s

MATLAB{]pGig