Dsplib 2020-04-14 20:04:27 +03:00
commit cc06086329
4 zmienionych plików z 1385 dodań i 4 usunięć

Plik diff jest za duży Load Diff

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -0,0 +1,106 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/W32TeX) (preloaded format=latex 2019.12.29) 9 JAN 2020 22:59
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**_formulas.tex
(./_formulas.tex
LaTeX2e <2019-10-01> patch level 3
(c:/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/10/25 v1.4k Standard LaTeX document class
(c:/texlive/2019/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2019/10/25 v1.4k Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(c:/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(c:/texlive/2019/texmf-dist/tex/latex/graphics/epsfig.sty
Package: epsfig 2017/06/25 v1.7b (e)psfig emulation (SPQR)
(c:/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
(c:/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks14
)
(c:/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
Package: graphics 2019/11/01 v1.3d Standard LaTeX Graphics (DPC,SPQR)
(c:/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
(c:/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: dvips.def on input line 105.
(c:/texlive/2019/texmf-dist/tex/latex/graphics-def/dvips.def
File: dvips.def 2017/06/20 v3.1d Graphics/color driver for dvips
))
\Gin@req@height=\dimen103
\Gin@req@width=\dimen104
)
\epsfxsize=\dimen105
\epsfysize=\dimen106
)
(c:/texlive/2019/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/08/11 v1.3c Input encoding file
\inpenc@prehook=\toks15
\inpenc@posthook=\toks16
)
(c:/texlive/2019/texmf-dist/tex/latex/newunicodechar/newunicodechar.sty
Package: newunicodechar 2018/04/08 v1.2 Defining Unicode characters
)
(./_formulas.aux)
\openout1 = `_formulas.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 11.
LaTeX Font Info: ... okay on input line 11.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 12.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line 12.
[1
] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
[14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28]
[29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43]
[44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58]
[59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73]
[74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88]
[89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102]
[103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114]
[115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126]
(./_formulas.aux) )
Here is how much of TeX's memory you used:
696 strings out of 492164
8713 string characters out of 6129101
70744 words of memory out of 5000000
5117 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
38i,6n,27p,290b,92s stack positions out of 5000i,500n,10000p,200000b,80000s
Output written on _formulas.dvi (126 pages, 17432 bytes).

Wyświetl plik

@ -87,9 +87,78 @@ int DSPL_API bilinear(double* bs, double* as, int ord, double* bz, double* az)
/******************************************************************************
Digital IIR filter coefficients calculation
*******************************************************************************/
/*! ****************************************************************************
\ingroup IIR_FILTER_DESIGN_GROUP
\fn int iir(double rp, double rs, int ord, double w0, double w1, int type, double* b, double* a)
\brief IIR digital filter transfer function \f$H(z)\f$
coefficients calculation which can be used in \ref filter_iir
\param[in] rp Filter passband ripple level (dB). \n \n
\param[in] rs Filter stopband supression level (dB).\n \n
\param[in] ord Filter order. \n
Number of \f$H(z)\f$ coefficients is `ord+1`. \n
This parameter must be evan for bandpass
and bandstop filter type.\n \n
\param[in] w0 Normlized cutoff frequency for LPF and HPF. \n
Left cutoff frequency for bandpass and bandstop filter. \n
Valid value from 0 to 1. \n
Here 0 corresponds to 0 Hz frequency, 1 corresponds to
Fs/2 Hz frequency. \n \n
\param[in] w1 Right cutoff frequency for bandpass and bandstop filter.\n
Valid value from 0 to 1. \n
Here 0 corresponds to 0 Hz frequency, 1 corresponds to
Fs/2 Hz frequency. \n
This parameter is ignored for LPF and HPF. \n \n
\param[in] type Filter type. \n
This paramenter is combination of filter type flags:\n
\verbatim
DSPL_FILTER_LPF - lowpass filter;
DSPL_FILTER_HPF - highpass filter;
DSPL_FILTER_BPASS - bandpass filter;
DSPL_FILTER_BSTOP - bandstop filter,
\endverbatim
and filter approximation flags:
\verbatim
DSPL_FILTER_BUTTER - Buttetworth filter;
DSPL_FILTER_CHEBY1 - Chebyshev type 1 filter;
DSPL_FILTER_CHEBY2 - Chebyshev type 2 filter;
DSPL_FILTER_ELLIP - elliptic filter.
\endverbatim
\n \n
\param[out] b Pointer to the vector of \f$H(z)\f$ numerator. \n
Vector size is `[ord+1 x 1]`.\n
Memory must be allocated. \n \n
\param[out] a Pointer to the vector of \f$H(z)\f$ denominator. \n
Vector size is `[ord+1 x 1]`.\n
Memory must be allocated. \n \n
\return
`RES_OK` if filter is calculated successfully. \n \n
Else \ref ERROR_CODE_GROUP "code error". \n
Example:
\include iir_test.c
Program calculates filter coefficients for different
`type` parameter combination. Also program calculates filters magnitude and
draws plot:
\image html iir_test.png
\author Sergey Bakhurin www.dsplib.org
***************************************************************************** */
int DSPL_API iir(double rp, double rs, int ord, double w0, double w1,
int type, double* b, double* a)
{
@ -167,7 +236,6 @@ int DSPL_API iir(double rp, double rs, int ord, double w0, double w1,
err = bilinear(bt, at, ord, b, a);
error_proc:
if(bs)