📄 readme.txt
字号:
GenFading.h and GenFading.cpp is the class to generate fading. The interface functions are written to follow COM/ATL style.
Initialize([in] int n, [in] double fd);
Update([in] int numOfSteps);
GetPwrDB([out] double* pDBArray);
SetN([in] int n);
GetN([out] int* pN);
SetFd([in] double fd);
GetFd([out] double* pFd);
GetMag([out] double* pMagArray);
GetComplexEnvelope([out] double* pRealArray, [out] double* pImagArray);
Initialize(n, fd) must be called first to specify the number of fading processes n and the normalized fading rate fd. Each time Update(numOfSteps) is called, the complex fading coefficient is updated by going forward numOfSteps. GetPwrDB(double* pDBArray) returns the power attenuation in dB. GetMag(double* pMagArray) returns the absolute magnitude of the complex fading coefficient. GetComplexEnvelope(double* pRealArray, double* pImagArray) retunrs both the real part and imaginary part of the complex fading coefficient. SetN() and GetN() can set and return the number of fading processes. Upon changing n, the fading generator is reset. SetFd() and GetFd() can set and return the normalized fading rate. Changing Fd does not reset the fading generator.
mainProg.cpp uses the above class to generate fading and write the output to .dat files. To better fit Bessel function, the number of oscillators/fading processes should be more than 8.
checkCorrelation.m is a matlab program to test the spatial and temporal correlation of the generated fading process.
Tested on Windows XP with Visual Studio 6.0 Enterprise and Matlab R12 v6.1.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -