⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fgwsinc.c

📁 ofdm的完整系统模型,包含信道参数,多径模型,doppler频移等都可以自由修改!是您做仿真的有力帮助.c语言运行速度快!
💻 C
字号:
/*
 *	*************************************************************************
 *	*									*
 *	*	This confidential and proprietary software may be used only	*
 *	*  as authorized by a licensing agreement from the Summit Group of	*
 *	*  Cadence Design Systems, Inc.  In the event of publication, the	*
 *	*  following notice is applicable:					*
 *	*									*
 *	*    (c) COPYRIGHT 1994 SUMMIT GROUP OF CADENCE DESIGN SYSTEMS, INC.	*
 *	*			ALL RIGHTS RESERVED				*
 *	*									*
 *	*	The entire notice above must be reproduced on all authorized	*
 *	*  copies.								*
 *	*									*
 *	*************************************************************************
 *
 */
/*
 * FILE:  parts/spb/cgs/generic/cgsfilt/fgwsinc.c
 * DATE:  Tue Oct 19, 1993
 * RELATED FILES:  
 * AUTHOR:  John Lundell
 * DESCRIPTION:  
 *	Windowed sinc filter generation
 *
 * NOTES/WARNINGS:  
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 */
#include "cgs.h"
#include "cgsfilt.h"

/*---------------------------------------------------------------
 * FUNCTION:  filtGenWSincLpf
 * DESCRIPTION:  
 * RETURN VALUE:  
 * NOTES/WARNINGS: 
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 */
void filtGenWSincLpf(sp_wghts, d_freq, d_gain)
Ovector	sp_wghts;
double	d_freq;
double	d_gain;
{
	int	len, half, i;
	double	*ws, *we, w;
	double	arg, wscl;
/*
 *  Setup lengths and pointers
 */
	len = OvGetLength(sp_wghts);
	ws = (double *) OvGetVirtStart(sp_wghts);
	ws[len-1] = 0.0;

	half = (len - 1) >> 1;
	len = half << 1;
	we = ws + len;
/*
 *  Calculate the filter tap weights
 */
	wscl = PI / half;
	for (i = 0; i < half; i++) {
		w = 0.54 - 0.46 * cos(wscl * i);
		arg = d_freq * (i - half);
		w *= sin(arg) / arg;
		*ws++ = w;
		*we-- = w;
	}
	*ws = 1.0;
/*
 *  Set the DC gain to 1.0
 */
	Dvcsum(sp_wghts, &wscl);
	wscl = d_gain / wscl;
	Dvscale(wscl, sp_wghts, sp_wghts);
}

⌨️ 快捷键说明

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