This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


2-D convolution matrix


T = convmtx2(H,m,n)
T = convmtx2(H,[m n])


T = convmtx2(H,m,n) returns the convolution matrix T for the matrix H. If X is an m-by-n matrix, then reshape(T*X(:),size(H)+[m n]-1) is the same as conv2(X,H).

T = convmtx2(H,[m n]) returns the convolution matrix, where the dimensions m and n are a two-element vector.

Class Support

The inputs are all of class double. The output matrix T is of class sparse. The number of nonzero elements in T is no larger than prod(size(H))*m*n.

See Also


Introduced before R2006a

Was this topic helpful?