HyperMath

FiltFilt

FiltFilt

Previous topic Next topic No expanding text in this topic  

FiltFilt

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

A utility function to remove phase lag from data filtered by a filter with given numerator and denominator coefficients.  It does this by running the data first through the function Filter in a forward direction and then running the output again in the reverse direction.

Syntax

OutputData = FiltFilt(Num, Den, InputData)

Arguments

Name

Description

 

Num

Vector of numerator coefficients in descending power of z.

 

Den

Vector of denominator coefficients in descending power of z.

 

InputData

A vector of data (real) to be filtered.  Must be of length greater or equal to three times the filter order (in other words, the maximum of the two lengths of Num and Den minus one) plus 1.

Output

Name

Description

 

OutputData

A vector of the filtered data.  Same size as the input data.

Example

Filter a set of data (stored in variable data) removing phase lag by a filter whose numerator and denominator coefficients are given by vectors b and a.

 

Syntax

 

Filtered = FiltFilt(b,a,data)

 

Result

 

Filtered is a vector of the filtered data.

Comments

Normally the coefficients would be obtained from a suitable filter design technique.

See Also:

Filter