Admin Production ni-theme
Current Publication

WindFIR_Filter

LabWindows/CVI

WindFIR_Filter

Advanced Analysis Library Only

AnalysisLibErrType WindFIR_Filter (int filterType, double samplingFrequency, double lowerCutoffFreq, double upperCutoffFreq, int numberOfCoefficients, int windowType, double windowParameter, double coefficients[]);

Purpose

Generates windowed FIR filter coefficients. This function computes only FIR coefficients. You can call a convolution function on the computed coefficients and the signal to perform actual data filtering.

Parameters

Input
Name Type Description
filterType int The type of filter. filterType must be one of the following values:
  • LOWPASS (0)
  • HIGHPASS (1)
  • BANDPASS (2)
  • BANDSTOP (3)
samplingFrequency double Sampling frequency, in Hz.
lowerCutoffFreq double The cutoff frequency for LOWPASS or HIGHPASS filters, or the low cutoff frequency for BANDPASS or BANDSTOP filters, in Hz.
upperCutoffFreq double The high cutoff frequency for BANDPASS or BANDSTOP filters. This parameter is not referenced if filterType is LOWPASS or HIGHPASS.
numberOfCoefficients int The total number of FIR filter coefficients.
windowType int The type of window to apply. windowType must be one of the following values:
  • RECTANGLE (0)
  • HANNING (1)
  • HAMMING (2)
  • BLKHARRIS (3)
  • EXBLKMAN (4)
  • BLKMAN (5)
  • FLATTOP (6)
  • BH4TERM (7)
  • BH7TERM (8)
  • LOWSIDELB (9)
  • BLKMANNUTTAL (11)
  • TRIANGLE (30)
  • KAISER (60)
  • DOLCHEBYSHEV (61)
  • GAUSSIAN (62)
windowParameter double The window parameter. This parameter is referenced only if windowType is one of the following values:
  • KAISER: para is beta.
  • GAUSSIAN: para is the standard deviation. If para < 0, the function uses 0.2 for para instead.
  • DOLCHEBYSHEV: para is the ratio of the mainlobe to the sidelobe, in dB. If para < 0, the function uses 60dB for para instead.
Output
Name Type Description
coefficients double [] The computed windowed FIR coefficients.

Return Value

Name Type Description
status AnalysisLibErrType A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later