Admin Production ni-theme
Current Publication

AllocCxIIRFilterStatePtr

LabWindows/CVI

AllocCxIIRFilterStatePtr

Advanced Analysis Library Only

CxIIRFilterStatePtr AllocCxIIRFilterStatePtr (int type, int order);

Purpose

Allocates and initializes the filterState structure. AllocCxIIRFilterStatePtr returns a pointer to the internal filter state for use with the complex IIR cascade filter coefficient design calls.

You input the type of the filter, such as lowpass, highpass, bandpass, or bandstop, and the order. AllocCxIIRFilterStatePtr allocates the internal filter state array.

Parameters

Input
Name Type Description
type int Controls the filter type of IIR filter coefficients.

  • LOWPASS (0): lowpass filter.
  • HIGHPASS (1): highpass filter.
  • BANDPASS (2): bandpass filter.
  • BANDSTOP (3): bandstop filter.
order int The order of the IIR filter. The default value is 3.

Return Value

Name Type Description
filterInformation CxIIRFilterStatePtr Pointer to the complex filter state structure that contains the internal filter information. Call this function to allocate filterInformation before you call one of the complex cascade IIR filter design functions.

When an error occurs, filterInformation is zero.

The definition of the filter structure is as follows:

typedef struct {

int numStates; /* number of internal states */
NIComplexNumber *states; /* pointer to internal state array */
} *CxIIRFilterStatePtr;

Additional Information

Library: Advanced Analysis Library

Include file: analysis.h

LabWindows/CVI compatibility: LabWindows/CVI 2012 and later