bpskmodvec.h

来自「压缩文件中是Error Correction Coding - Mathemat」· C头文件 代码 · 共 40 行

H
40
字号
// BPSKmodvec.h --- a simple BPSK modulator to modulate vectors of data// Todd K. Moon// Copyright 2004 by Todd K. Moon// Permission is granted to use this program/data// for educational/research only#ifndef BPSKMODVEC_H#define  BPSKMODVEC_H#include "BPSKmod.h"class BPSKmodvec {   int n;						// length of vectorpublic:   double *v;					// vector of data   BPSKmod mod1;				// scalar modulator   BPSKmodvec(int in_n,double a_in=1) : mod1(a_in) {	  n = in_n;	  v = new double[n];   }   ~BPSKmodvec() {delete[] v;}   double *mod(unsigned char *bitsin) {	  for(int i = 0; i < n; i++) {		 v[i] = mod1.mod(bitsin[i]);	  }	  return v;   }};#endif/*Local Variables:compile-command: "g++ -c BPSKmodvec.h"End:*/

⌨️ 快捷键说明

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