Signal Processing Toolbox
  Go to function:
    Search    Help Desk 
filter2    See Also

Two-dimensional digital filtering.

Syntax

Description

Y = filter2(B,X) filters the two-dimensional data in X with the two-dimensional FIR filter in the matrix B. The result, Y, is computed using two-dimensional convolution and is the same size as X.

Y = filter2(B,X,'shape') returns Y computed with size specified by shape:

The filter2 function is part of the standard MATLAB language.

Algorithm

The filter2 function uses conv2 to compute the full two-dimensional convolution of the FIR filter with the input matrix. By default, filter2 extracts and returns the central part of the convolution that is the same size as the input matrix. Use the shape parameter to specify an alternate part of the convolution for return.

See Also

conv2
Two-dimensional convolution.
filter
Filter data with a recursive (IIR) or nonrecursive (FIR) filter.


[ Previous | Help Desk | Next ]