《基于TI DSP的通用算法实现》程序代码

源代码在线查看: example 3-21.c

软件大小: 223.37K
上传用户: yueyan51
关键词: DSP 算法 程序 代码
下载地址: 免注册下载 普通下载 VIP

相关代码

				
				Example 3 - 21. Split Function C Listing for the FFT of two N-Point Real Sequences
				
				/****************************************************************
				FILE:split.c 
				     This is the C source code for the implementation of the 
				split routine which is the additional computations in computing 
				the DFT of two N-point real-valued sequences using one N-point 
				complex DFT.
				****************************************************************/
				
				#include "params.h"
				void split(int N, COMPLEX *X, COMPLEX *X1, COMPLEX *X2)
				{
					int k;
					X1[0].real = X[0].real; 	X1[0].imag = 0;
					X2[0].real = X[0].imag; 	X2[0].imag = 0;
					X1[N/2].real = X[N/2].real;	X1[N/2].imag = 0;
					X2[N/2].real = X[N/2].imag;	X2[N/2].imag = 0;
					for (k=1; k						X1[k].real = (X[k].real + X[N-k].real)/2;
						X1[k].imag = (X[k].imag - X[N-k].imag)/2;
						X2[k].real = (X[k].imag + X[N-k].imag)/2;
						X2[k].imag = (X[N-k].real - X[k].real)/2;
						X1[N-k].real = X1[k].real;
						X1[N-k].imag = -X1[k].imag;
						X2[N-k].real = X2[k].real;
						X2[N-k].imag = -X2[k].imag;
					}
				}
				
							

相关资源