# deconv

Deconvolution and polynomial division

## Syntax

``````[q,r] = deconv(u,v)``````

## Description

example

``````[q,r] = deconv(u,v)``` deconvolves a vector `v` out of a vector `u` using long division, and returns the quotient `q` and remainder `r` such that `u = conv(v,q) + r`. If `u` and `v` are vectors of polynomial coefficients, then deconvolving them is equivalent to dividing the polynomial represented by `u` by the polynomial represented by `v`.```

## Examples

collapse all

Create two vectors `u` and `v` containing the coefficients of the polynomials $2{x}^{3}+7{x}^{2}+4x+9$ and ${x}^{2}+1$, respectively. Divide the first polynomial by the second by deconvolving `v` out of `u`, which results in quotient coefficients corresponding to the polynomial $2x+7$ and remainder coefficients corresponding to $2x+2$.

```u = [2 7 4 9]; v = [1 0 1]; [q,r] = deconv(u,v)```
```q = 1×2 2 7 ```
```r = 1×4 0 0 2 2 ```

## Input Arguments

collapse all

Input vectors, specified as either row or column vectors. `u` and `v` can be different lengths or data types.

• If one or both of `u` and `v` are of type single, then the output is also of type single. Otherwise, `deconv` returns type `double`.

• The lengths of the inputs should generally satisfy `length(v) <= length(u)`. However, if `length(v) > length(u)`, then `deconv` returns the outputs as `q = 0` and `r = u`.

Data Types: `double` | `single`
Complex Number Support: Yes

## Output Arguments

collapse all

Quotient, returned as a row or column vector such that ```u = conv(v,q)+r```.

Data Types: `double` | `single`

Remainder, returned as a row or column vector such that ```u = conv(v,q)+r```.

Data Types: `double` | `single`

## Version History

Introduced before R2006a