control_bits.c

来自「wcdma模型」· C语言 代码 · 共 38 行

C
38
字号
/* | | Copyright disclaimer: |   This software was developed at the National Institute of Standards |   and Technology by employees of the Federal Government in the course |   of their official duties. Pursuant to title 17 Section 105 of the |   United States Code this software is not subject to copyright |   protection and is in the public domain. | |   We would appreciate acknowledgement if the software is used. |*/#include <stdio.h>#include <stdlib.h>#include <math.h>#include "config_wcdma.h"int wcdma_remove_control_bits(	   double data[],	/* IN: input data symbol vector */           int bits_in_frame,	/* IN: legth of the output vector*/	   int slots_in_frame,	/* IN: number of slots in a frame*/           int nControl,        /* IN Number of contol bits in slot/**/           double out[])	/* OUT: output symbols for one block */{   int i,i_tmp;  int coded_bits_slot = (bits_in_frame - slots_in_frame * nControl)/ slots_in_frame;  int bits_in_slot = bits_in_frame / slots_in_frame ;  i_tmp = 0;  for (i = 0; i < bits_in_frame; i++){    if ( (i % bits_in_slot) > (nControl - 1)){      out[i_tmp] = data[i];      i_tmp++;	}}}

⌨️ 快捷键说明

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