Convolution and digital filtration
Functions  
int  dspl_conv (double *a, int na, double *b, int nb, double *c) 
Linear convolution for real input vectors. More...  
int  dspl_conv_cmplx (double *aR, double *aI, int na, double *bR, double *bI, int nb, double *cR, double *cI) 
Linear convolution for real input vectors. More...  
int  dspl_filter_iir (double *b, double *a, int ord, double *x, int n, double *y) 
IIR filter output for real filter coefficients and real signals. More...  
Detailed Description
Functions for digital convolution and digital filtration.
Function Documentation
◆ dspl_conv()
int dspl_conv  (  double *  a, 
int  na,  
double *  b,  
int  nb,  
double *  c  
) 
Linear convolution for real input vectors.
This function calculates a linear convolution of two real vectors.
 Parameters

[in] a First input vector pointer.
Vector size is[na x 1]
.
[in] na First vector length.
[in] b Second input vector pointer.
Vector size is[nb x 1]
.
[in] nb Second vector length.
[out] c Linear convolution vector real part pointer.
Vector size is[na + nb  1 x 1]
.
Memory must be allocated.
 Returns
DSPL_OK
if convolution is calculated successfully;
DSPL_ERROR_PTR
if pointer are wrong.
This situation can be ifa
isNULL
orb
isNULL
orc
isNULL
.
DSPL_ERROR_SIZE
ifna<1
ornb < 1
.
◆ dspl_conv_cmplx()
int dspl_conv_cmplx  (  double *  aR, 
double *  aI,  
int  na,  
double *  bR,  
double *  bI,  
int  nb,  
double *  cR,  
double *  cI  
) 
Linear convolution for real input vectors.
This function calculates a linear convolution of two real vectors \( c = a * b\).
 Parameters

[in] aR First input vector real part pointer.
Vector size is[na x 1]
.
[in] aI First input vector image part pointer.
Vector size is[na x 1]
.
This pointer can be NULL ifa
is real vector
[in] na First vector length.
[in] bR Second input vector real part pointer.
Vector size is[nb x 1]
.
[in] bI Second input vector image part pointer.
Vector size is[nb x 1]
.
This pointer can be NULL ifb
is real vector.
[in] nb Second vector length.
[out] cR Linear convolution vector real part pointer.
Vector size is[na + nb  1 x 1]
.
Memory must be allocated.
[out] cI Linear convolution vector real part pointer.
Vector size is[na + nb  1 x 1]
.
Memory must be allocated.
This pointer can beNULL
ifaI
andbI
areNULL
pointers.
 Returns
DSPL_OK
if convolution is calculated successfully
DSPL_ERROR_PTR
if pointer are wrong. This situation can be if:
aR
isNULL
orbR
isNULL
orcR
isNULL
.
cI
is NULL ifaI
orbI
isn'tNULL
.
DSPL_ERROR_SIZE
if na<1
or nb < 1
.
◆ dspl_filter_iir()
int dspl_filter_iir  (  double *  b, 
double *  a,  
int  ord,  
double *  x,  
int  n,  
double *  y  
) 
IIR filter output for real filter coefficients and real signals.
Function Calculates IIR filter output. IIR filter transfer function is
\[ H(z) = \frac{\sum_{n = 0}^{N1} b_n \cdot z^{n}} {1+{\frac{1}{a_0}}\sum_{m = 1}^{M1} a_m \cdot z^{n}}, \]
here \(a_0\) cannot be zero, \(N=M=\)ord
.
 Parameters

[in] b IIR filter transfer function numerator coefficients pointer. Vector size is [ord + 1 x 1]
.[in] a IIR filter transfer function denominator coefficients pointer. Vector size is [ord + 1 x 1]
. This pointer can beNULL
. Filter becomes FIR in this case with impulse response corresponds to vectorb
[in] ord Filter order. [in] x Input signal pointer. Vector size is [n x 1]
.[in] n Input signal vector length. [out] y IIR filter output vector pointer. Vector size is [n x 1]
. Memory must be allocated.
 Returns
DSPL_OK
if filter output is calculated successfully.
DSPL_ERROR_PTR
if pointer are wrong. This situation can be if:b
isNULL
orx
isNULL
ory
isNULL
.
DSPL_ERROR_SIZE
iford < 1
orn < 1
.
DSPL_ERROR_FILTER_A0
ifa[0]
is zero.
Generated on Sat Mar 11 2017 12:37:51 for DSPL  Digital signal processing library by 1.8.13
Select spelling error with your mouse and press 