conv2d

Version:

Applies a two-dimensional convolution.

Syntax

c = conv2d(a, b)
c = conv2d(a, b, d)
c = conv2d(a, b, shape)
c = conv2d(a, b, d, shape)
Legacy name: conv2

a

Real or complex matrix.

b

Real or complex matrix.

d

Real or complex matrix. a and b must be vectors if d is given. If a is a column vector and b is a row vector, conv2d(a, b, d) is the same as conv2d(a * b, d).

shape

Size of the output. shape is a string that accepts the following values.

Name Description
'full' (default)

Returns the full two-dimensional convolution. c is larger than a.

'same'

Returns the central part of the convolution. c is the same size as a.

'valid'

Returns only the parts of the convolution that MathScript computes without zero-padded edges. c is smaller than a.

c

Convolution of a and b.

A = rand(2);
B = rand(4);
C = conv2d(A, B, 'full')

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices