# deconv

deconv(b,a)

Construct vector `c` such that `b = conv(a,c) + r`. Equivalent to polynomial division.

## Examples

1. Perform polynomial division:

``````julia> b = [1, 0, -1, 2];
julia> a = [1, 1];
julia> c = deconv(b, a)
3-element Array{Float64,1}:
1.0
-1.0
2.0``````

This example performs polynomial division of `b` by `a` and returns the quotient vector `c`.

2. Handle rational coefficients:

``````julia> b = [2//3, -1//2, 1//4, -1//8];
julia> a = [1//2, -1//4];
julia> c = deconv(b, a)
3-element Array{Rational{Int64},1}:
4//3
-1//2
1//4``````

The `deconv` function can handle rational coefficients in the input vectors.

3. Divide two complex polynomials:
``````julia> b = [1+2im, 0, -1-3im];
julia> a = [1im, 1];
julia> c = deconv(b, a)
2-element Array{Complex{Int64},1}:
-1+3im
1-5im``````

The `deconv` function works with complex polynomial coefficients as well.

Common mistake example:

``````julia> b = [1, 2, 3];
julia> a = [];
julia> c = deconv(b, a)
ERROR: Singular matrix``````

In this example, the `a` vector is empty, resulting in a singular matrix and causing an error. Ensure that the `a` vector is non-empty when using `deconv`.