ZBPFILT

Purpose:

Performs band pass filtering by zeroing the FFT values.

Syntax:

ZBPFILT(series, fp1, fp2, mask)

series

-

Input series to filter.

fs1

-

Optional. A real, the first band pass cutoff frequency. Defaults to rate(series)/10.

fs2

-

Optional. A real, the second band pass cutoff frequency. Defaults to rate(series)/2.

mask

-

Optional. An integer, return the frequency domain mask only. Defaults to 0, return processed input.

Returns:

A series, the band pass filtered output.

Example:

W1: gsin(1000, 0.001, 10) + gsin(1000, 0.001, 20) + gsin(1000, 0.001, 30) + gsin(1000, 0.001, 40)

W2: zbpfilt(w1, 15, 35)

 

W1 contains the sum of 10 Hz, 20 Hz, 30 Hz and 40 Hz sinewaves.

 

W2 filters out the 10 Hz and 40 Hz components leaving a series consisting of 20 Hz and 30 Hz sine components.

Remarks:

ZBPFILT performs band pass filtering by zeroing out the stop band components of the FFT of the input. FFT zeroing is a crude but fast filtering operation. However, the pass band and transition edge of the equivalent filter will exhibit significant ripple.

 

 

For a flatter response, use traditional filter design methods such as those offered by DADiSP/Filters.

  

If fs1 < 0 or fs2 < 0, no filtering is performed.

 

If mask == 1, the frequency domain binary mask used to zero out the stop band frequencies is returned.

 

See ZBSFILT for a band stop filter.

See Also:

BANDPASS

DADiSP/Filters

FFT

FINTEG

ZBSFILT

ZHPFILT

ZLPFILT