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

📄 genfading.h

📁 通信中的具有jaks频谱的随机函数的产生
💻 H
字号:
#include <valarray>
#include <math.h>

const double PI = 3.14159265;

using namespace std;

class CFadingEnergyGenerator
{
public:
	void Initialize(int n, double fd);
	void Update(int numOfSteps);
	void GetPwrDB(double *pDbArray); // power in dB
	void SetN(int n);
	void GetN(int *pN);
	void SetFd(double fd);
	void GetFd(double *pFd);
	void GetComplexEnvelope(double *pRealArray,double *pImagArray); // complex fading coefficients
	void GetMag(double *pMagArray); // absolute magnitude

private:
	double   m_maxOmega;		// 2*pi*fd

	// number of oscillators used and number of output needed
	unsigned int	m_nos, m_branchNumber;

	valarray<double> m_cosBeta, m_sinBeta, m_theta, m_omega, m_coeffReal, m_coeffImag;

	// z is the output of n-dimension fast Walsh transform from input x
	void fwt(valarray<double> & z, valarray<double> & x, unsigned int n);
};

⌨️ 快捷键说明

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