📄 modwrap_c.mht
字号:
From: <由 Microsoft Internet Explorer 5 保存>
Subject:
Date: Wed, 27 Sep 2006 22:47:13 +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/MODWRAP.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>/* modwrap.c - modulo-N wrapping of length-L signal */
void modwrap(L, x, N, xtilde) /* usage: modwrap(L, x, N, =
xtilde); */
int L, N; /* \(x\) is =
\(L\)-dimensional */
double *x, *xtilde; /* xtilde is =
\(N\)-dimensional */
{
int n, r, m, M;
r =3D L % N; /* remainder =
\(r=3D0,1,\dotsc,N-1\) */
M =3D (L-r) / N; /* quotient of division =
\(L/N\) */
for (n=3D0; n<N; n++) {
if (n < r) /* non-zero part of last =
block */
xtilde[n] =3D x[M*N+n]; /* if \(L<N\), this is =
the only block */
else
xtilde[n] =3D 0; /* if \(L<N\), pad =
\(N-L\) zeros at end */
for (m=3DM-1; m>=3D0; m--) /* remaining blocks =
*/
xtilde[n] +=3D x[m*N+n]; /* if \(L<N\), this =
loop is skipped */
}
}
</PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -