⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dec2iir3.h

📁 各种工程计算的库函数
💻 H
字号:
/*    IIR Decimation filter for rate 2    Copyright (C) 2002 Jussi Laako    This program is free software; you can redistribute it and/or modify    it under the terms of the GNU General Public License as published by    the Free Software Foundation; either version 2 of the License, or    (at your option) any later version.    This program is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU General Public License for more details.    You should have received a copy of the GNU General Public License    along with this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#ifdef _MSC_VER#pragma warning(disable:4305)#endif/* f1: 0.24375,  f2: 0.25, r: 0.1, a: 96, t: elliptic *//*static const long lDec2IIRSize = 8l;static const float fpDec2IIRCoeffs[][5] = {{ // 0    0.0636055269017405,    0.120237273165707,    0.0636055269017405,    1.10059257576193,    -0.34804090273112},{ // 1    0.197395100757952,    0.251955931876418,    0.197395100757952,    0.853316818943547,    -0.500062952335869},{ // 2    0.416867536074146,    0.291504346387221,    0.416867536074146,    0.557073607566323,    -0.682313026101836},{ // 3    0.630732106186422,    0.220804780514429,    0.630732106186422,    0.336225336671185,    -0.818494329558457},{ // 4    0.786029157621284,    0.12850692420049,    0.786029157621284,    0.201609680048344,    -0.902174919491402},{ // 5    0.881212080327745,    0.0598200661289426,    0.881212080327745,    0.127415820574785,    -0.949660047359217},{ // 6    0.933417750217719,    0.0197780000165418,    0.933417750217719,    0.0898376822944953,    -0.976451182746475},{ // 7    0.958297484517192,    0.00209738478453047,    0.958297484517192,    0.0744385769165404,    -0.993130930735456}};static const double dpDec2IIRCoeffs[][5] = {{ // 0    0.0636055269017405,    0.120237273165707,    0.0636055269017405,    1.10059257576193,    -0.34804090273112},{ // 1    0.197395100757952,    0.251955931876418,    0.197395100757952,    0.853316818943547,    -0.500062952335869},{ // 2    0.416867536074146,    0.291504346387221,    0.416867536074146,    0.557073607566323,    -0.682313026101836},{ // 3    0.630732106186422,    0.220804780514429,    0.630732106186422,    0.336225336671185,    -0.818494329558457},{ // 4    0.786029157621284,    0.12850692420049,    0.786029157621284,    0.201609680048344,    -0.902174919491402},{ // 5    0.881212080327745,    0.0598200661289426,    0.881212080327745,    0.127415820574785,    -0.949660047359217},{ // 6    0.933417750217719,    0.0197780000165418,    0.933417750217719,    0.0898376822944953,    -0.976451182746475},{ // 7    0.958297484517192,    0.00209738478453047,    0.958297484517192,    0.0744385769165404,    -0.993130930735456}};*//* f1: 0.24375,  f2: 0.25, r: 0.1, a: 120, t: elliptic */static const long lDec2IIRSize = 10l;static const float fpDec2IIRCoeffs[][5] = {{ // 0    0.0860883552986558,    0.147454170614253,    0.0860883552986558,    1.13368419454638,    -0.453315075757942},{ // 1    0.230138726053264,    0.265710323710514,    0.230138726053264,    0.862775228186636,    -0.588763004003677},{ // 2    0.423332055996105,    0.290943741886257,    0.423332055996105,    0.58841934809913,    -0.726027201977596},{ // 3    0.607542248579554,    0.233820176523996,    0.607542248579554,    0.381064569119293,    -0.829969242802397},{ // 4    0.749928014882175,    0.154162195076207,    0.749928014882175,    0.244691516068237,    -0.898709740908793},{ // 5    0.846567103431297,    0.0869479806425298,    0.846567103431297,    0.161336299588397,    -0.94141848709352},{ // 6    0.906783436809245,    0.0409329790075077,    0.906783436809245,    0.112953857197871,    -0.96745370982387},{ // 7    0.941531243802369,    0.0138152282315155,    0.941531243802369,    0.0868712028407657,    -0.98374891867702},{ // 8    0.958970880382364,    0.00148441353321557,    0.958970880382364,    0.0756521632465086,    -0.995078337544452},{ // 9    0.186490176427825,    0.186490176427825,    0,    0.627019647144349,    0}};static const double dpDec2IIRCoeffs[][5] = {{ // 0    0.0860883552986558,    0.147454170614253,    0.0860883552986558,    1.13368419454638,    -0.453315075757942},{ // 1    0.230138726053264,    0.265710323710514,    0.230138726053264,    0.862775228186636,    -0.588763004003677},{ // 2    0.423332055996105,    0.290943741886257,    0.423332055996105,    0.58841934809913,    -0.726027201977596},{ // 3    0.607542248579554,    0.233820176523996,    0.607542248579554,    0.381064569119293,    -0.829969242802397},{ // 4    0.749928014882175,    0.154162195076207,    0.749928014882175,    0.244691516068237,    -0.898709740908793},{ // 5    0.846567103431297,    0.0869479806425298,    0.846567103431297,    0.161336299588397,    -0.94141848709352},{ // 6    0.906783436809245,    0.0409329790075077,    0.906783436809245,    0.112953857197871,    -0.96745370982387},{ // 7    0.941531243802369,    0.0138152282315155,    0.941531243802369,    0.0868712028407657,    -0.98374891867702},{ // 8    0.958970880382364,    0.00148441353321557,    0.958970880382364,    0.0756521632465086,    -0.995078337544452},{ // 9    0.186490176427825,    0.186490176427825,    0,    0.627019647144349,    0}};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -