Navigation

Operators and Keywords

Function List:

C++ API

Built-in Function: conv2 (A, B)
Built-in Function: conv2 (v1, v2, m)
Built-in Function: conv2 (…, shape)

Return the 2-D convolution of A and B.

The size of the result is determined by the optional shape argument which takes the following values

shape = "full"

Return the full convolution. (default)

shape = "same"

Return the central part of the convolution with the same size as A. The central part of the convolution begins at the indices floor ([size(B)/2] + 1).

shape = "valid"

Return only the parts which do not include zero-padded edges. The size of the result is max (size (A) - size (B) + 1, 0).

When the third argument is a matrix, return the convolution of the matrix m by the vector v1 in the column direction and by the vector v2 in the row direction.

See also: conv, convn.

Package: octave