MATLAB Function Reference Previous page   Next Page
conv

Convolution and polynomial multiplication

Syntax

Description

w = conv(u,v) convolves vectors u and v. Algebraically, convolution is the same operation as multiplying the polynomials whose coefficients are the elements of u and v.

Definition

Let m = length(u) and n = length(v). Then w is the vector of length m+n-1 whose kth element is

The sum is over all the values of j which lead to legal subscripts for u(j) and v(k+1-j), specifically j = max(1,k+1-n): min(k,m). When m = n, this gives

Algorithm

The convolution theorem says, roughly, that convolving two sequences is the same as multiplying their Fourier transforms. In order to make this precise, it is necessary to pad the two vectors with zeros and ignore roundoff error. Thus, if

and

then conv(x,y) = ifft(X.*Y)

See Also

conv2, convn, deconv, filter

convmtx and xcorr in the Signal Processing Toolbox


Previous page  contrast conv2 Next page

© 1994-2005 The MathWorks, Inc.