imat_fn/filterf


Purpose

FIR Filter the supplied imat_fn time history.

Syntax

g=filterf(f,'low',5)
g=filterf(f,'band',[5.5 6.8])
g=filterf(IN,TYPE,WP,WS,'silent','nopad','noprogbar')

Description

FILTERF applies a Finite Impulse Response (FIR) filter to the supplied imat_fn IN. It uses a Kaiser window. TYPE is a string specifying the type of filter. Supported filter types are

'high'   - High pass
'low'    - Low pass
'band'   - Band pass
'stop'   - Notch

WP is a scalar (for high- and low-pass) or a 1x2 vector (for bandpass and notch) filters. It specifies the filter frequencies. WS is an optional scalar or vector that specifies the edges of the filter. For example, for a low-pass filter, you might set WP to 5 Hz and WS to 5.5 Hz. The range between 5 and 5.5 Hz is called the slopeband. If WS is not supplied, it is set to 2% around WP. The allowable ripple in the passband and stopband is 1%. FILTERF stores the requested filter and parameters in IDLine2 of the output.

The string 'silent' suppresses output. If it is not supplied (the default), status messages will be displayed. A plot of the filter desired and actual characteristics will be displayed.

The string 'noprogbar' suppresses the progress bar.

By default FILTERF will extend the time history if necessary so that the desired filter order can be used. The filter requires about 3 times as many time history points as the filter order. It does this by flipping the supplied time history along the X axis and taking the inverse both forward and backward until it has enough time samples. The optional string 'nopad' bypasses this, reducing the filter order to work with the supplied time history.

FILTERF requires the Signal Processing toolbox.

Examples

>> g=filterf(f,'band',[5.5 6.8])
-------------------------------------
Nyquist frequency: 50.000000 Hz
Filter requested bandpass frequency:  5.500000-6.800000 Hz
Filter requested stopband frequency:  5.390000-6.936000 Hz
Using a Kaiser filter of order 2030
Filter maximum amplitude is 1.009982
Filter actual passband frequency:  5.504926-6.810345 Hz
Filter actual stopband frequency:  5.406404-6.908867 Hz
Padding time history 1 by 5132 samples to achieve sufficient length for the filter
Padding time history 2 by 5132 samples to achieve sufficient length for the filter
Padding time history 3 by 5132 samples to achieve sufficient length for the filter

g =

3x1 IMAT Function with the following attributes:

Record Name                 FunctionType     AbscissaSpacing  NumberElements
--------------------------- ---------------- ---------------- ----------------
1_(1X+,1X+)                 Time Response    Even             1000
2_(1X+,1X+)                 Time Response    Even             1000
3_(1X+,1X+)                 Time Response    Even             1000

>> g=filterf(f,'band',[5.5 6.8],'silent','nopad')

g =

3x1 IMAT Function with the following attributes:

Record Name                 FunctionType     AbscissaSpacing  NumberElements
--------------------------- ---------------- ---------------- ----------------
1_(1X+,1X+)                 Time Response    Even             1000
2_(1X+,1X+)                 Time Response    Even             1000
3_(1X+,1X+)                 Time Response    Even             1000

>>

See Also

imat_fn/filteri