FUNCTION REFERENCE

filter2

Apply a two-dimensional finite impulse response filter.

Apply a two-dimensional finite impulse response filter.

Syntax

filter2(H, X); filter2(H, X, SHAPE)

Computes conv2(X, rot90(H,2), SHAPE). Logical and integer inputs are converted to double first. SHAPE is 'same' by default; 'full' and 'valid' are also accepted. The kernel is rotated without conjugation.

Example

filter2([1 2 1], [1 2 3 4])   % [4 8 12 11]

Differences from MATLAB: Uses the existing bounded double/complex-double conv2 implementation.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.