dft_c.mht

来自「常用的DSP算法集锦」· MHT 代码 · 共 37 行

MHT
37
字号
From: <由 Microsoft Internet Explorer 5 保存>
Subject: 
Date: Wed, 27 Sep 2006 22:46:06 +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/DFT.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>/* dft.c - N-point DFT of length-L real-valued signal */

#include &lt;cmplx.h&gt;                               /* complex =
arithmetic */

void dtftr();                                    /* DTFT's over a =
frequency range */

void dft(L, x, N, X)                             /* usage: dft(L, x, N, =
X); */
double *x;                                       /* \(x\) is =
\(L\)-dimensional real */
complex *X;                                      /* \(X\) is =
\(N\)-dimensional complex */
int L, N;
{
       double pi =3D 4 * atan(1.0);

       dtftr(L, x, N, X, 0.0, 2*pi);             /* \(N\) frequencies =
over \([0,2\pi)\) */
}
</PRE></BODY></HTML>

⌨️ 快捷键说明

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