# deconv

## Purpose

Deconvolution and polynomial division.

## Synopsis

    [q,r] = deconv(b,a)

## Description

`[q,r] = deconv(b,a)` deconvolves vector `a` out of vector `b`, using long division. The quotient is returned in vector `q` and the remainder in vector `r` such that `b = conv(q,a)+r`.

If `a` and `b` are vectors of polynomial coefficients, convolving them is equivalent to multiplying the two polynomials, and deconvolution is polynomial division. The result of dividing `b` by `a` is quotient `q` and remainder `r`.

## Examples

If

    a = [1  2  3  4]
    b = [10  20  30]

the convolution is

    c = conv(a,b)

    c =
        10    40    100    160    170    120

Use deconvolution to divide `a` back out:

    [q,r] = deconv(c,a)

    q =
        10    20    30
    r =
         0    0    0    0    0    0

gives a quotient equal to `b` and a zero remainder.

## Algorithm

`deconv` uses the `filter` primitive.

## See Also

    conv, residue
    convmtx, conv2, and filter in the Signal Processing Toolbox

(c) Copyright 1994 by The MathWorks, Inc.