# FIR_Coef

Advanced Analysis Library Only

AnalysisLibErrType FIR_Coef (int type, double samplingFreq, double lowerCutoffFreq, double upperCutoffFreq, int numberOfCoefficients, double FIRCoefficientArray[]);

## Purpose

Generates a set of FIR filter coefficients based on the window design method. FIR_Coef returns the coefficients as the truncated impulse response of an ideal frequency response of the selected filter type.

Use Convolve to achieve the actual filtering.

## Parameters

Input
Name | Type | Description
type | integer | Controls the filter type of the FIR filter coefficients to design. type has the following valid values: lowpass = 0 (default) highpass = 1 bandpass = 2 bandstop = 3
samplingFreq | double-precision | Sampling frequency in Hertz.
lowerCutoffFreq | double-precision | Lower cutoff frequency in Hertz.
upperCutoffFreq | double-precision | Upper cutoff frequency in Hertz.
numberOfCoefficients | integer | Length of the FIR filter.
Output
Name | Type | Description
FIRCoefficientArray | double-precision array | Calculated output window FIR filter 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.