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

📄 dvcsum.c

📁 ofdm的完整系统模型,包含信道参数,多径模型,doppler频移等都可以自由修改!是您做仿真的有力帮助.c语言运行速度快!
💻 C
字号:
/*
 *	*************************************************************************
 *	*									*
 *	*	This confidential and proprietary software may be used only	*
 *	*  as authorized by a licensing agreement from the Alta Group of	*
 *	*  Cadence Design Systems, Inc.  In the event of publication, the	*
 *	*  following notice is applicable:					*
 *	*									*
 *	*    (c) COPYRIGHT 1995 ALTA GROUP OF CADENCE DESIGN SYSTEMS, INC.	*
 *	*			ALL RIGHTS RESERVED				*
 *	*									*
 *	*	The entire notice above must be reproduced on all authorized	*
 *	*  copies.								*
 *	*									*
 *	*************************************************************************
 *
 */
/*
 * FILE:  dvcsum.c
 * DATE:  Nov 1, 1989
 * RELATED FILES:  
 * AUTHOR:  John Lundell
 * DESCRIPTION:  "c" Dvcsum function
 * NOTES/WARNINGS:  
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 *      2.6    John Lundell 02/23/90  Changed Macro calls to register pointers.
 */
#include "cgs.h"
/*
 *---------------------------------------------------------------
 * FUNCTION:  Dvcsum(sp_src,d_res)
 * DESCRIPTION:  
 *	Performs a vector component sum of the Ovector src
 *	placing the result in res.
 *
 * RETURN VALUE:  The result
 * NOTES/WARNINGS: 
 * REVISION HISTORY:
 *	Release		Who	Date	Comments
 *      2.6    John Lundell 02/23/90  Changed Macro calls to register pointers.
 */
double Dvcsum(sp_src, dp_res)
Ovector sp_src;
double  *dp_res;
{
	register long 	n = sp_src->length;
	register char  	*sp = sp_src->virtstart;
	register long	stps = sp_src->stepsize;
	register double	result = 0.0;


	while (n-- > 0) {
		result += *(double *) sp;
		sp += stps;
	}

	*dp_res = result;
	return result;
}

⌨️ 快捷键说明

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