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

📄 ccan2_c.mht

📁 常用的DSP算法集锦
💻 MHT
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject: 
Date: Wed, 27 Sep 2006 22:37:26 +0800
MIME-Version: 1.0
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.oxbad.com/DSP/maindoc/arithmetic_source/c/CCAN2.C
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.2963" name=3DGENERATOR></HEAD>
<BODY><PRE>/* ccan2.c - circular buffer implementation of canonical =
realization */

void wrap2();                        /* defined in Section =
\ref{hardware.sec} */

double ccan2(M, a, b, w, q, x)
double *a, *b, *w, x;                /* q =3D circular pointer offset =
index */
int M, *q;                           /* a,b have common order M */
{
       int i;
       double y =3D 0;

       w[*q] =3D x;                               /* read input sample x =
*/

       for (i=3D1; i&lt;=3DM; i++)
              w[*q] -=3D a[i] * w[(*q+i)%(M+1)];

       for (i=3D0; i&lt;=3DM; i++)
              y +=3D b[i] * w[(*q+i)%(M+1)];

       (*q)--;                                  /* update circular delay =
line */
       wrap2(M, q);

       return y;                                /* output sample */
}
</PRE></BODY></HTML>

⌨️ 快捷键说明

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