Signal Processing Toolbox    
convmtx

Convolution matrix.

Syntax

Description

A convolution matrix is a matrix, formed from a vector, whose inner product with another vector is the convolution of the two vectors.

A = convmtx(c,n) where c is a length m column vector returns a matrix A of size (m+n-1)-by-n. The product of A and another column vector x of length n is the convolution of c with x.

A = convmtx(r,n) where r is a length m row vector returns a matrix A of size n-by-(m+n-1). The product of A and another row vector x of length n is the convolution of r with x.

Example

Generate a simple convolution matrix.

Note that convmtx handles edge conditions by zero padding.

In practice, it is more efficient to compute convolution using

than by using a convolution matrix.

Algorithm

convmtx uses the function toeplitz to generate the convolution matrix.

See Also
conv
Convolution and polynomial multiplication.
convn
N-dimensional convolution (see the MATLAB documentation).
conv2
Two-dimensional convolution.
dftmtx
Discrete Fourier transform matrix.


 conv2 corrcoef