Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

conv - Convolution and polynomial multiplication

Syntax

w = conv(u,v)
C = conv(...,'shape')

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.

C = conv(...,'shape') returns a subsection of the convolution, as specified by the shape parameter:

full

Returns the full convolution (default).

same

Returns the central part of the convolution of the same size as A.

valid

Returns only those parts of the convolution that are computed without the zero-padded edges. Using this option, length(c) is max(length(a)-max(0,length(b)-1),0).

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

w(1) = u(1)*v(1)
w(2) = u(1)*v(2)+u(2)*v(1)
w(3) = u(1)*v(3)+u(2)*v(2)+u(3)*v(1)
...
w(n) = u(1)*v(n)+u(2)*v(n-1)+ ... +u(n)*v(1)
...
w(2*n-1) = u(n)*v(n)

See Also

conv2, convn, deconv, filter

convmtx and xcorr in the Signal Processing Toolbox

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2010- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS