Provided by: librtfilter-dev_1.1-3_amd64

**NAME**

rtf_create_filter - Creates a custom filter

**SYNOPSIS**

#include<rtfilter.h>hfilterrtf_create_filter(unsignedintnchann,intproctype,unsignedintnum_len,constvoid*num,unsignedintdenum_len,constvoid*denum,inttype);

**DESCRIPTION**

This function creates and initializes a digital linear filter whose the Z-transform is rational and processingnchannchannels of a data type specified byproctype. The numerator and denominator of the rational expression are specified by respectively two arraysnumanddenumcontaining the coefficients in the ascending order of the 2 polynoms. The number of elements in each arrays is controlled bynum_lenand enum_len.denum_lenis allowed to be equal to zero as well asdenumis allowed to be NULL. In such case, the denominator will be set to 1. The data type of the values innumanddenumare specified bytype. Theproctypeandtypemust be one the following constants:RTF_FLOATspecifies real single precision (float)RTF_DOUBLEspecifies real double precision (double)RTF_CFLOATspecifies complex single precision (complexfloat)RTF_CDOUBLEspecifies complex double precision (complexdouble) The expected data type of the output of the filter has the same precision as the one specified byproctypeand is complexproctypeortypespecifies a complex type. Said otherwise: * IfproctypeisRTF_FLOATorRTF_CFLOATthen the output data type will have single precision. Otherwise it will have double precision. * Ifproctypeortypespecifies a complex type, then the output will be complex as well. Otherwise, it will be real.rtf_create_filter() can be used to use a filter that has been designed somewhere else. In particular, this function can be used directly with the output of filter design function of MATLAB. In such case, the usual B and A arrays returned by the filter design functions corresponds exactly to respectivelynumanddenum.

**RETURN** **VALUE**

Returns the handle to the created filter in case of success, NULL otherwise.

**PERFORMANCE** **CONSIDERATION**

See note ofrtf_filter(3)

**SEE** **ALSO**

rtf_destroy_filter(3),rtf_init_filter(3),rtf_filter(3)