conv2
R2026b2-D convolution
Description
returns the two-dimensional
convolution of matrices C = conv2(A,B)A and B.
If
Ais a matrix andBis a row vector (orAis a row vector andBis a matrix), thenCis the convolution of each row of the matrix with the vector.If
Ais a matrix andBis a column vector (orAis a column vector andBis a matrix), thenCis the convolution of each column of the matrix with the vector.
returns the 2-D convolution of C = conv2(u,v,A)A with the outer product of the
vectors u and v. The vectors
u and v can be row or column vectors. This
operation is equivalent to convolving A with the convolution of
the column-vector form of u and the row-vector form of
v, that is,
conv2(A,conv2(u(:),v(:)')).
Examples
Input Arguments
Output Arguments
Limitations
For a column vector
uand a row vectorv, the syntaxconv2(u,v,A)performs the convolution operation , where is the convolution operator and is the outer product operator. Ideally, in the absence of round-off errors, this operation satisfies due to the commutativity and associativity of convolution. However, because of round-off errors, the commutativity and associativity properties do not always hold. For this reason, operations such asconv2(u,v,A),conv2(A,u*v), andconv2(conv2(A,u),v)might produce different results.



