filter2
2-D digital filter.
📝Syntax
Y = filter2(H, X)
Y = filter2(H, X, shape)
📥Input Arguments
Parameter Description
H coefficients of rational transfer function.
X input data.
shape 'same' (default), 'valid' or 'full'.
📤Output Arguments
Parameter Description
Y result: 2-D digital filter.
📄Description

Y = filter2(H, X) applies a finite impulse response filter to a matrix of data X according to coefficients in a matrix H.

💡Examples
A = zeros(10);
A(3:7, 3:7) = ones(5);
H = [1 2 1; 0 0 0; -1 -2 -1];
R = filter2(H, A, 'valid')
🔗See Also
conv2
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub