FFT-1.0到1.2(国外英文资料).docVIP

  • 7
  • 0
  • 约1.6万字
  • 约 34页
  • 2017-07-05 发布于河南
  • 举报
FFT-1.0到1.2(国外英文资料)

FFT-1.0到1.2 #包括 iom128。” #包括内联函数。” / ********************************************************************* 快速福利叶变换C函数 函数简介:此函数是通用的快速傅里叶变换C语言函数,移植性强,以下部分不依 赖硬件此函数采用联合体的形式表示一个复数,输入为自然顺序的复。 数(输入实数是可令复数虚部为0),输出为经过FFT变换的自然顺序的 复数 使用说明:使用此函数只需更改宏定义fft_n的值即可实现点数的改变,fft_n的 应该为2的N次方,不满足此条件时应在后面补0 函数调用:FFT(S); 作者:吉帅虎 时间:2010-2-20 版本:Ver1.0 参考文献: ********************************************************************** / #包括数学。” #定义PI 3.1415926535897932384626433832795028841971 /定义圆周率值 #定义fft_n 128 / /定义福利叶变换的点数 结构compx {浮房,图像;};//定义一个复数结构 结构compx的[ fft_n ];// FFT输入和输出:从的[ 1 ]开始存放,根据大小自己定义 / ******************************************************************* 函数原型:结构compx EE(struct结构compx compx B1,B2) 函数功能:对两个复数进行乘法运算 输入参数:两个以联合体定义的复数A、B 输出参数:一和B的乘积,以联合体的形式输出 ******************************************************************* / 结构compx EE(struct compx,结构compx B) { 结构compx C; c.real = A. * * b.imag b.real-a.imag; c.imag = A. * b.imag + a.imag * b.real; 返回(c); } / ***************************************************************** 函数原型:无效的FFT(struct compx *新,int n) 函数功能:对输入的复数组进行快速傅里叶变换(FFT) 输入参数:*新复数结构体组的首地址指针,结构型 ***************************************************************** / 无效的FFT(struct compx *新) { int F,M,NV2,NM1,I,K,L,J = 0; 结构compx U,W,T; NV2 = fft_n / 2; / / index operations, namely the natural order into reverse sequence, using Reid algorithm Nm1=FFT_N-1; For (i=0; inm1; i++) { If (ij) / / if ij is indexed { T=xin[j]; Xin[j]=xin[i]; Xin[i]=t; } K=nv2; / / J under a reverse sequence While (k=j) / / if k=j, said the highest J for 1 { J=j-k; / / the most high to 0 K=k/2; //k/2, compare the secondary highs, followed by analogies, one by one, until one bit is 0 } J=j+k; / / the 0 to 1 } { Int, Le, Lei, IP; //FFT arithmetic kernel; uses butterfly operation to complete FFT operation F=FFT_N; For (l=1; =1; l++ (f=f/2)!) / / L is calculated, the calculation of the butterfly series ; For (m=1; m=l; m++) / control butterfly knot series {//m stands for level M butterfly, l is butterfl

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档