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

📄 testtv_eqzf.m

📁 OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有帮助!
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Property of Freescale
%  Freescale Confidential Proprietary
%  Freescale Copyright (C) 2005 All rights reserved
%  ----------------------------------------------------------------------------
%  $RCSfile: testTV_EqZF.m.rca $
%  Tag $Name:  $
%  $Revision: 1.2 $
%  $Date: Tue Dec 12 18:29:45 2006 $
%  Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%-- This function test the generation of random TV from SlotExtraction
%
%       function test_EqZF(seed)
%
% input:
% seed : (double), random seed
%
% Note: for a good use of mGenBin, make sure your files are not "read only"


%-- Matlab files used by this file
% mEqZF
%-- End of list

function test_EqZF(seed)

% clear global
% clear functions
% close all

profile off

addpath('../');
addpath('../../../../../../../SP/CM/matlab');

dataSize = 48;
fname = 'EqZF';
Q = 15;
QCHANEST = 31;

if (exist('seed','var') == 0)
    seed = sum(100*clock);
end
rand('state',seed);

system(['del ..\..\vector\log\TCRND\',fname,'.txt']);
diary(['../../vector/log/TCRND/',fname,'.txt']);

disp('EqZF Simulation');
disp('=====================================');
disp(' ');
%%%%%%%%%%%%%%%%%%%%%% Initialize Paramters %%%%%%%%%%%%%%%%%%%%%%%%%%%
disp('*********Initializing Parameters*********')
disp(strcat('SEED = ',num2str(seed)));

% generates pilot random data , include the 4/3 Pilot boosting
InReal = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
InImag = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
In_fixed = int16(InReal + InImag*i);
In = double(In_fixed);
ChanEstReal = round((2^(QCHANEST+1)-1).*rand(1,dataSize)-2^QCHANEST);
ChanEstImag = round((2^(QCHANEST+1)-1).*rand(1,dataSize)-2^QCHANEST);
ChanEst_fixed = int32(ChanEstReal + ChanEstImag*i);
ChanEst = double(ChanEst_fixed);

Out = mEqZF(In,ChanEst);

Out_fixed = round(Out);

mGenBin(In_fixed,'../../vector/in/TCRND/IF2cRX_RND_RND_RND_RND.lod','int16','1R1I','b');
mGenBin(ChanEst_fixed,'../../vector/in/TCRND/IF2cRXCtrl_RND_RND_RND_RND.lod','int32','1R1I','b');
mGenBin(Out_fixed,'../../vector/ref/TCRND/IF2bRX_RND_RND_RND_RND.lod','int16','1R1I','b');

mGenHeader(In_fixed,'../../vector/in/TCRND/IF2cRX_RND_RND_RND_RND.h','int16','short int gasiData');
mGenHeader(ChanEst_fixed,'../../vector/in/TCRND/IF2cRXCtrl_RND_RND_RND_RND.h','int32','long int galiResponse');
mGenHeader(Out_fixed,'../../vector/ref/TCRND/IF2bRX_RND_RND_RND_RND.h','int16','short int gasiRefData');

diary off

rmpath('../');
rmpath('../../../../../../../SP/CM/matlab');


⌨️ 快捷键说明

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