filter_2d

Version:

Applies a two-dimensional FIR filter.

Syntax

y = filter_2d(f, x)
y = filter_2d(f, x, shape)
Legacy name: filter2

f

2D FIR filter to use. f is a 2D array.

x

Signal to filter. x is a 2D array.

shape

Size of the filtered signal. shape is a string that accepts the following values:

Name Description
'full'

Returns the full two-dimensional convolution. y is larger than x.

'same' (default)

Returns the central part of the convolution. y is the same size as x.

'valid'

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

y

Filtered signal. y is a 2D array of real or complex, floating-point numbers.

F = rand(2);
X = rand(4);
Y = filter_2d(F, X, 'full')

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices