Signal Processing Toolbox |

**Syntax**

**Description**

`y`

performs zero-phase digital filtering by processing the input data in both the forward and reverse directions (see problem 5.39 in [1]). After filtering in the forward direction, it reverses the filtered sequence and runs it back through the filter. The resulting sequence has precisely zero-phase distortion and double the filter order. ` = `

filtfilt(b,a,x)
`filtfilt`

minimizes start-up and ending transients by matching initial conditions, and works for both real and complex inputs.

Note that `filtfilt`

should not be used with differentiator and Hilbert FIR filters, since the operation of these filters depends heavily on their phase response.

**Algorithm**

`filtfilt`

is an M-file that uses the `filter`

function. In addition to the forward-reverse filtering, it attempts to minimize startup transients by adjusting initial conditions to match the DC component of the signal and by prepending several filter lengths of a flipped, reflected copy of the input signal.

**See Also**

**References**

[1] Oppenheim, A.V., and R.W. Schafer, *Discrete-Time Signal Processing*, Prentice-Hall, 1989, pp. 311-312.

[2] Mitra, S.K., *Digital Signal Processing*, 2nd ed., McGraw-Hill, 2001, Sections 4.4.2 and 8.2.5.

[3] Gustafsson, F., "Determining the initial states in forward-backward filtering," *IEEE Transactions on Signal Processing*, April 1996, Volume 44, Issue 4, pp. 988--992,

filternorm | filtic |

© 1994-2005 The MathWorks, Inc.