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

📄 test_ceintratilecompare.m

📁 OFDMA 物理层开发的matlab 源码.飞思卡尔提供.对物理层开发的工程师有帮助!
💻 M
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Property of Freescale
%  Freescale Confidential Proprietary
%  Freescale Copyright (C) 2005 All rights reserved
%  ----------------------------------------------------------------------------
%  $RCSfile: test_CEIntraTileCompare.m.rca $
%  Tag $Name:  $
%  $Revision: 1.4 $
%  $Date: Thu Jan  4 14:47:50 2007 $
%  Target: Matlab
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%-- Matlab files used by this file
% FindRevision
% CreateReportMEX
%-- End of list


function status  = test_CEIntraTileCompare(seed)

clear global
clear functions
close all

profile off

addpath('../');

ntile = 6;
dataSize = ntile * 2;
%fname = 'CEIntraTile.mexw32';
fname = 'CEIntraTile';
Q = 15;

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


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

% generates pilot random data , include the 4/3 Pilot boosting
pilot1real = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
pilot1imag = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
pilot1 = pilot1real + pilot1imag*i;
pilot3real = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
pilot3imag = round((2^(Q+1)-1).*rand(1,dataSize)-2^Q);
pilot3 = pilot3real + pilot3imag*i;

mChanEst = mCEIntraTile(ntile,pilot1,pilot3);
ChanEst = CEIntraTile(ntile,pilot1,pilot3);


diff = (mChanEst - ChanEst)./max(ChanEst);
%-- display results
rdiff=real(diff);
idiff=imag(diff);
figure(1)
plot(rdiff,'^-b');
hold on
plot(idiff,'s-r');
diff2 = abs((mChanEst - ChanEst))./max(abs(ChanEst));
plot(diff2,'.-k');
legend(...
    'real diff',...
    'imag diff',...
    'abs diff');
xlabel('NumCarriers');
ylabel('abs difference (relative to max(fpOut_fixed) )');
hold off

%--
diff = (mChanEst - ChanEst)./(ChanEst);
rdiff=real(diff);
idiff=imag(diff);
figure(2)
plot(rdiff,'^-b');
hold on
plot(idiff,'s-r');
diff2 = abs((mChanEst - ChanEst))./(abs(ChanEst));
plot(diff2,'.-k');
legend(...
    'real diff',...
    'imag diff',...
    'abs diff');
xlabel('NumCarriers');
ylabel('difference ');
hold off

% look for any difference between the outputs
if any(abs(diff)>1e-8)
    error('Error: differences between mData and fpData.');
    status = -1 ;
else
    disp('Comparison OK')
    status = 1 ;
end


rmpath('../');

⌨️ 快捷键说明

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