# InvCh_Coef

Advanced Analysis Library Only

AnalysisLibErrType InvCh_Coef (int type, int order, double samplingFreq, double lowerCutoffFreq, double upperCutoffFreq, double stopBandAtten, double aCoefficientArray[], int numberACoefficients, double bCoefficientArray[], int numberBCoefficients);

## Purpose

Generates the set of filter coefficients to implement an IIR filter as specified by the inverse Chebyshev filter model.

aCoefficientArray and bCoefficientArray are the reverse and forward filter coefficients. Use IIRFiltering to achieve the actual filtering.

## Parameters

Input
Name | Type | Description
type | integer | Controls the filter type of the inverse Chebyshev IIR filter coefficients. type has the following valid values: lowpass = 0 (default) highpass = 1 bandpass = 2 bandstop = 3
order | integer | Order of the IIR filter. Default Value: 3.
samplingFreq | double-precision | Sampling frequency in Hertz.
lowerCutoffFreq | double-precision | Lower cutoff frequency of the filter in Hertz.
upperCutoffFreq | double-precision | Upper cutoff frequency of the filter in Hertz.
stopBandAtten | double-precision | Stop band attenuation, in decibels, of the IIR filter to design. Default Value: 60.0.
numberACoefficients | integer | Number of coefficients in aCoefficientArray. numberACoefficients = order + 1 for low or highpass filters numberACoefficients = 2 × order + 1 for bandpass or bandstop filters
numberBCoefficients | integer | Number of coefficients in bCoefficientArray. numberBCoefficients = order + 1 for low or highpass filters numberBCoefficients = 2 × order + 1 for bandpass or bandstop filters
Output
Name | Type | Description
aCoefficientArray | double-precision array | Array that contains the reverse coefficients of the designed IIR filter.
bCoefficientArray | double-precision array | Array that contains the forward coefficients of the designed IIR filter.

## 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.