deconvDeconvolution or polynomial division
[q, r] = deconv(b, a)It performs the polynomial division:
b is a vector containing the coefficients of
a is a vector containing the coefficients of a, i.e., a(1), must be non-zero.
The outputs q and r contain the coefficients of the polynomials
where
When n < m, the output q is 0 and r is the same as b.
💡 When representing a polynomial by a vector
p,p(1)andp(end)are the highest and the zeroth order coefficients, respectively.💡
conv(a,q) + rgives the same vector asb.
r is the same as the numerator u:u = 1:5;
v = 1:6;
[q,r] = deconv(u,v)
q =
0.000
r =
1.000 2.000 3.000 4.000 5.000
u = 1:7;
v = 1:6;
[q,r] = deconv(u,v)
q =
1.000 0.000
r =
Columns 1 through 5:
0.000 0.000 0.000 0.000 0.000
Columns 6 through 7:
0.000 7.000
conv gives back u of the previous example.u = 1:7;
v = 1:6;
[q,r] = deconv(u,v)
conv(v,q) + r
q =
1.000 0.000
r =
Columns 1 through 5:
0.000 0.000 0.000 0.000 0.000
Columns 6 through 7:
0.000 7.000
ans =
Columns 1 through 5:
1.000 2.000 3.000 4.000 5.000
Columns 6 through 7:
6.000 7.000