📄 can3_c.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject:
Date: Wed, 27 Sep 2006 22:36:48 +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/CAN3.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>/* can3.c - IIR filtering in canonical form, emulating a DSP =
chip */
double can3(M, a, b, w, x) /* usage: y =3D can3(M, a, b, =
w, x); */
double *a, *b, *w, x; /* \(w\) =3D internal state =
vector */
int M; /* \(a,b\) have common order =
\(M\) */
{
int i;
double y;
w[0] =3D x; /* read input sample =
*/
for (i=3D1; i<=3DM; i++) /* forward order =
*/
w[0] -=3D a[i] * w[i]; /* MAC instruction */
y =3D b[M] * w[M];
for (i=3DM-1; i>=3D0; i--) { /* backward =
order */
w[i+1] =3D w[i]; /* data shift =
instruction */
y +=3D b[i] * w[i]; /* MAC instruction */
}
return y; /* output sample */
}
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -