1RTF_CREATE_FILTER(3)           rtfilter library           RTF_CREATE_FILTER(3)
2
3
4

NAME

6       rtf_create_filter - Creates a custom filter
7

SYNOPSIS

9       #include <rtfilter.h>
10
11       hfilter rtf_create_filter(unsigned int nchann, int proctype,
12                                 unsigned int num_len, const void *num,
13                                 unsigned int denum_len, const void *denum,
14                                 int type);
15

DESCRIPTION

17       This function creates and initializes a digital linear filter whose the
18       Z-transform is rational and processing nchann channels of a  data  type
19       specified by proctype.
20
21       The  numerator and denominator of the rational expression are specified
22       by respectively two arrays num and denum containing the coefficients in
23       the  ascending  order of the 2 polynoms. The number of elements in each
24       arrays is controlled by num_len and enum_len.  denum_len is allowed  to
25       be  equal to zero as well as denum is allowed to be NULL. In such case,
26       the denominator will be set to 1.  The data type of the values  in  num
27       and denum are specified by type.
28
29       The proctype and type must be one the following constants:
30
31          RTF_FLOAT specifies real single precision (float)
32
33          RTF_DOUBLE specifies real double precision (double)
34
35          RTF_CFLOAT specifies complex single precision (complex float)
36
37          RTF_CDOUBLE specifies complex double precision (complex double)
38
39       The  expected data type of the output of the filter has the same preci‐
40       sion as the one specified by proctype and is complex proctype  or  type
41       specifies a complex type. Said otherwise:
42
43        * If  proctype  is  RTF_FLOAT  or RTF_CFLOAT then the output data type
44          will have single precision. Otherwise it will have double precision.
45
46        * If proctype or type specifies a complex type, then the  output  will
47          be complex as well. Otherwise, it will be real.
48
49       rtf_create_filter()  can be used to use a filter that has been designed
50       somewhere else. In particular, this function can be used directly  with
51       the output of filter design function of MATLAB. In such case, the usual
52       B and A arrays returned by  the  filter  design  functions  corresponds
53       exactly to respectively num and denum.
54

RETURN VALUE

56       Returns  the handle to the created filter in case of success, NULL oth‐
57       erwise.
58

PERFORMANCE CONSIDERATION

60       See note of rtf_filter(3)
61

SEE ALSO

63       rtf_destroy_filter(3), rtf_init_filter(3), rtf_filter(3)
64
65
66
67EPFL                                 2010                 RTF_CREATE_FILTER(3)
Impressum