?? wcdmauplinkgui.m
字號(hào):
function fig = WCDMAUplinkGUI()
%********************************************************************
%function fig = WCDMAUplinkGUI()
%
% Copyright 2002 The Mobile and Portable Radio Research Group
%
% This fuction provides the Graphical User Interface for the
% Uplink simulator. The function creates the figure and all
% edit boxes, list boxes, and checkboxes used in the interface
%************************************************************************
load WCDMAUplinkGUI
global SFHandle NumDPDCH_Handle MPathHandle Runstring
global DelayHandle1 DelayHandle2 DelayHandle3 DelayHandle4 DelayHandle5 DelayHandle6
global AmpHandle1 AmpHandle2 AmpHandle3 AmpHandle4 AmpHandle5 AmpHandle6
%Code for positioning figure in the upper senter of the screen
bdwidth = 5;
topbdwidth=30;
ScreenSize = get(0,'ScreenSize');
Height = 450;
Width = 600;
right = round((ScreenSize(3)-Width)/2)-2*bdwidth;
bottom = ScreenSize(4)-Height-4*topbdwidth;
%Create figure for the dialog
h0 = figure('Color',[0.8 0.8 0.8], ...
'Colormap',mat0, ...
'FileName','WCDMAUplinkGUI.m', ...
'PaperPosition',[18 180 576 432], ...
'PaperUnits','points', ...
'Position',[right bottom 560 420], ...
'Tag','Fig1', ...
'ToolBar','none');
%Create title
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[49.25 270.25 300.75 25], ...
'String','WCDMA Uplink Simulator', ...
'FontName','Arial',...
'FontSize',18,...
'Style','text', ...
'Tag','StaticText1');
%Number of iterations edit box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[14.25 239.25 100.75 15], ...
'String','Number of Iterations', ...
'Style','text', ...
'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.NumIterations=1000;UplinkSimConfig.NumIterations = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[111 239.25 45 15], ...
'String','1000', ...
'Style','edit', ...
'Tag','EditText1');
%EbNo Edit box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[27.75 192.75 69.75 15], ...
'String','EbNo (dB)', ...
'Style','text', ...
'Tag','StaticText2');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.EbNo_db=20;UplinkSimConfig.EbNo_db = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[108 192.75 25.5 15], ...
'String','20', ...
'Style','edit', ...
'Tag','EditText2');
%Velocit Edit Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[27.75 175.5 72 15], ...
'String','Velocity (km/hr)', ...
'Style','text', ...
'Tag','StaticText3');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.Velocity=5;UplinkSimConfig.Velocity = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[108 174.75 26.25 14.25], ...
'String','5', ...
'Style','edit', ...
'Tag','EditText3');
%Pulse Shape Duration Edit Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[227.25 227.25 78 27], ...
'String','Transmitter Pulse Shape Duration', ...
'Style','text', ...
'Tag','StaticText4');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','SetUbound', ...
'ListboxTop',0, ...
'Position',[313.5 233.25 20. 15], ...
'String','10', ...
'Style','edit', ...
'Tag','EditText4');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[335.25 233.25 45 15], ...
'String','Chips', ...
'Style','text', ...
'Tag','StaticText5');
%OverSampling Rate Edit Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[227.25 197.625 82.5 26.25], ...
'String','Oversampling Rate', ...
'Style','text', ...
'Tag','StaticText6');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.SamplesPerChip=5;UplinkSimConfig.SamplesPerChip = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[313.5 203.25 18 15], ...
'String','5', ...
'Style','edit', ...
'Tag','EditText5');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[335.75 203.25 64.5 15], ...
'String','Samples Per Chip', ...
'Style','text', ...
'Tag','StaticText7');
%Spreading Factor Pop-up box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[227.25 177.75 84 15], ...
'String','Spreading Factor', ...
'Style','text', ...
'Tag','StaticText8');
SFHandle = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','SF_Callback;', ...
'ListboxTop',0, ...
'Position',[313.5 177.75 45 15.75], ...
'String',[' 4 ';' 8 ';' 16 ';' 32 ';' 64 ';' 128 ';' 256 ';' 512 '], ...
'Style','popupmenu', ...
'Tag','PopupMenu1', ...
'UserData','[]', ...
'Value',1);
%Number of Pilot Symbos Pop-up Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[227.25 159 83.25 14.25], ...
'String','# of Pilot Symbols', ...
'Style','text', ...
'Tag','StaticText9');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','NumPilotValue=[2;3;4;5;6;7;8];UplinkSimConfig.NumPilot=NumPilotValue(get(gcbo,''value''));', ...
'ListboxTop',0, ...
'Position',[312.75 159 30 15], ...
'String',['2 ';' 3 ';' 4 ';' 5 ';' 6 ';' 7 ';' 8 '], ...
'Style','popupmenu', ...
'Tag','PopupMenu2', ...
'Value',7);
%Number of Data Channels Pop-up Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[228 140.25 71.25 15], ...
'String','# of DPDCHs', ...
'Style','text', ...
'Tag','StaticText10');
NumDPDCH_Handle = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','DPDCH_Callback', ...
'ListboxTop',0, ...
'Position',[312.75 141.75 45 13.5], ...
'String',['1 ';' 2 ';' 3 ';' 4 ';' 5 ';' 6 '], ...
'Style','popupmenu', ...
'Tag','PopupMenu3', ...
'Value',1);
%GUI for Weighting factors
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[280.5 120 86.25 15], ...
'String','Weighting Factors', ...
'Style','text', ...
'Tag','StaticText11');
%Data Channel Weight Pop-up Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[268.5 105 45 12], ...
'String','DPDCH', ...
'Style','text', ...
'Tag','StaticText12');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','BetaDValue=[0;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15];UplinkSimConfig.BetaD=BetaDValue(get(gcbo,''value''));', ...
'ListboxTop',0, ...
'Position',[276.75 83.25 29.25 15], ...
'String',['0 ';'1 ';'2 ';'3 ';'4 ';'5 ';'6 ';'7 ';'8 ';'9 ';'10 ';'11 ';'12 ';'13 ';'14 ';'15 '], ...
'Style','popupmenu', ...
'Tag','PopupMenu4', ...
'Value',16);
%Control Channel Weight Pop-up Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[338.25 103.5 45 12], ...
'String','DPCCH', ...
'Style','text', ...
'Tag','StaticText13');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','BetaCValue=[0;2;3;4;5;6;7;8;9;10;11;12;13;14;15];UplinkSimConfig.BetaC=BetaCValue(get(gcbo,''value''));', ...
'ListboxTop',0, ...
'Position',[345 81.75 28.5 15], ...
'String',['0 ';'1 ';'2 ';'3 ';'4 ';'5 ';'6 ';'7 ';'8 ';'9 ';'10 ';'11 ';'12 ';'13 ';'14 ';'15 '], ...
'Style','popupmenu', ...
'Tag','PopupMenu4', ...
'Value',16);
%Multipath Profile GUI
%Delay edit boxes and then
%Amplitude edit boxes
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',12, ...
'ListboxTop',0, ...
'Position',[52.5 111.75 100.5 15], ...
'String','Multipath Profile', ...
'Style','text', ...
'Tag','StaticText14');
%Delay edit boxes
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[30 92.25 45 15], ...
'String','Delay in ns', ...
'Style','text', ...
'Tag','StaticText15');
DelayHandle1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'ListboxTop',0, ...
'Position',[30 74.5 33.75 15.75], ...
'String','0', ...
'Style','edit', ...
'Tag','EditText6');
DelayHandle2 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Delay2Callback', ...
'ListboxTop',0, ...
'Position',[64.75 74.5 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
DelayHandle3 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Delay3Callback', ...
'ListboxTop',0, ...
'Position',[99.5 74.5 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
DelayHandle4 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Delay4Callback', ...
'ListboxTop',0, ...
'Position',[134.25 74.5 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
DelayHandle5 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Delay5Callback', ...
'ListboxTop',0, ...
'Position',[169 74.5 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
DelayHandle6 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Delay6Callback', ...
'ListboxTop',0, ...
'Position',[203.75 74.5 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
%Relative Amplitude Edit Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[30 57.5 117 15], ...
'String','Relative Average Power in dB', ...
'Style','text', ...
'Tag','StaticText15');
AmpHandle1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'ListboxTop',0, ...
'Position',[30 39.75 33.75 15.75], ...
'String','0', ...
'Style','edit', ...
'Tag','EditText6');
AmpHandle2 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Amp2Callback', ...
'ListboxTop',0, ...
'Position',[63.75 39.75 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
AmpHandle3 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Amp3Callback', ...
'ListboxTop',0, ...
'Position',[99 39.75 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
AmpHandle4 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Amp4Callback', ...
'ListboxTop',0, ...
'Position',[134.25 39.75 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
AmpHandle5 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Amp5Callback', ...
'ListboxTop',0, ...
'Position',[169 39.75 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
AmpHandle6 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','Amp6Callback', ...
'ListboxTop',0, ...
'Position',[203.75 39.75 33.75 15.75], ...
'Style','edit', ...
'Tag','EditText6');
%Interferers Edit Box
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.8 0.8 0.8], ...
'Units','points', ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[27.75 132.75 66 12.75], ...
'String','# of Interferers', ...
'Style','text', ...
'Tag','StaticText16');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.NumInterferer=5;UplinkSimConfig.NumInterferer = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[106.5 132 25.5 15], ...
'String','5', ...
'Style','edit', ...
'Tag','EditText7');
%Maximum Offset for Interferers Edit Box
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'FontSize',10, ...
'ListboxTop',0, ...
'Position',[27.75 148.25 72 26.25], ...
'String','Maximum Offset for Interferers', ...
'Style','text', ...
'Tag','StaticText17');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','UplinkSimConfig.MaxOffset=512;UplinkSimConfig.MaxOffset = str2num(get(gcbo, ''String''));', ...
'ListboxTop',0, ...
'Position',[108.75 153 30 15], ...
'String','512', ...
'Style','edit', ...
'Tag','EditText8');
%Multipath CheckBox
MPathHandle = uicontrol('Parent',h0, ...
'BackgroundColor',[0.8 0.8 0.8], ...
'Units','points', ...
'FontSize',10,...
'ListboxTop',0, ...
'Max',1,...
'Min',0,...
'Position',[265 50 150 20], ...
'String','Include Multipath in Interferers', ...
'Style','checkbox', ...
'Tag','Pushbutton1');
%Execute simulation pushbutton
h1 = uicontrol('Parent',h0, ...
'BackgroundColor',[0.8 0.8 0.8], ...
'Callback','RunCallback',...
'Units','points', ...
'FontSize',16, ...
'FontName','Arial',...
'FontWeight','bold',...
'ListboxTop',0, ...
'Position',[303.75 10 40 25], ...
'String','GO', ...
'Style','pushbutton', ...
'Tag','Pushbutton1');
if nargout > 0, fig = h0; end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -