filter2
Perform 2D FIR filtering.
Syntax
y = filter2(b,x)
y = filter2(...,shape)
Inputs
- b
- The 2D polynomial coefficients of the FIR filter.
- x
- The 2D data to be filtered.
- shape
- Options include:
Outputs
- y
- The filtered 2D data.
Example
b = [5,4,3;4,3,2;3,2,1];
y = filter2(b,[1,2,3,4,5;2,3,4,5,6;3,4,5,6,7;4,5,6,7,8])
y = [Matrix] 4 x 5
14 32 47 62 58
32 69 96 123 110
47 96 123 150 131
46 89 110 131 110
Comments
filter2(b,x) is similar to conv2(x,y), except that the rows and columns of b are reversed compared to y, and the two functions do not use the same default for shape.