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

📄 ui_start.asv

📁 MATLAB Simulation of OFDM System
💻 ASV
字号:
function fig = ui_start()
% This is the machine-generated representation of a Handle Graphics object
% and its children.  Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
% 
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files.  Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.

%load ui_start
clear all;
close all;
clc;

load ui_start


h0 = figure('Units','points', ...
	'Color',[0.8 0.8 0.8], ...
	'Colormap',mat0, ...
	'FileName','ui_start.m', ...
	'MenuBar','none', ...
	'Name','WLAN Simulator', ...
	'NumberTitle','off', ...
	'PaperPosition',[18 180 576 432], ...
	'PaperUnits','points', ...
	'Position',[120 250 500 225], ...
	'Resize','off', ...
	'Tag','UIFigure', ...
	'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.75 0.75 0.75], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 180 100 20], ...
	'String','Packet Length (Bytes)', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 160 100 18], ...
	'String','100', ...
	'Style','edit', ...
	'Tag','PktLen');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.75 0.75 0.75], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 135 100 20], ...
	'String','Convolutional code rate', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.75 0.75 0.75], ...
	'ListboxTop',0, ...
	'Position',[120 135 75 20], ...
	'String',['R1/2';'R2/3';'R3/4'], ...
	'Style','popupmenu', ...
	'Tag','ConvCodeRate', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[20 115 150 18.75], ...
	'String','Interleave Bits', ...
	'Style','checkbox', ...
	'Tag','InterleaveBits', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.75 0.75 0.75], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[20 95 100 20], ...
	'String','Modulation', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.75 0.75 0.75], ...
	'ListboxTop',0, ...
	'Position',[120 95 75 20], ...
	'String',['BPSK ';'QPSK ';'16QAM';'64QAM'], ...
	'Style','popupmenu', ...
	'Tag','Modulation', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 56.25 168.75 18.75], ...
	'String','Transmitter diversity', ...
	'Style','checkbox', ...
	'Tag','UseTxDiversity');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 37.5 168.75 18.75], ...
	'String','Receiver diversity', ...
	'Style','checkbox', ...
	'Tag','UseRxDiversity');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 160 90 20], ...
	'String','0', ...
	'Style','edit', ...
	'Tag','FreqError');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 180 90 20], ...
	'String','Frequency Error', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 140 90 15], ...
	'String','Channel Model', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[200 120 90 18.75], ...
	'String','AWGN', ...
	'Style','radiobutton', ...
	'Tag','AWGN', ...
	'Enable','inactive', ...
	'Value',1);

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'Enable','on', ...
	'ListboxTop',0, ...
	'Position',[200 100 90 18.75], ...
	'String','Exponential decay', ...
	'Style','radiobutton', ...
	'Tag','ExponentialDecay');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 80 40 18.75], ...
	'String','50', ...
	'Style','edit', ...
	'Tag','ExpDecayTrms');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[240 80 55 18.75], ...
	'String','T rms (ns)', ...
	'Style','text', ...
	'Tag','StaticText1');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 65 90 15], ...
	'String','Signal to Noise Ratio (dB)', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[200 50 90 15], ...
	'String','4:2:12', ...
	'Style','edit', ...
	'Tag','SNR');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300 180 125 20], ...
	'String','Synchronization algorithms', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[300 160 125 18.75], ...
	'String','Packet Detection', ...
	'Style','checkbox', ...
	'Tag','PacketDetection');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[300 140 125 18.75], ...
	'String','Fine Time Sync', ...
	'Style','checkbox', ...
	'Tag','FineTimeSync');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[300 120 125 18.75], ...
	'String','Frequency Sync', ...
	'Style','checkbox', ...
	'Tag','FreqSync');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[300 100 125 18.75], ...
	'String','Pilot Phase Tracking', ...
	'Style','checkbox', ...
	'Tag','PilotPhaseTrack');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[300 80 125 18.75], ...
	'String','Channel Estimation', ...
	'Style','checkbox', ...
	'Tag','ChannelEst');
%%%%%%%%%%%%%%%%%%%%%'Callback','ui_start_sim', ...&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'BusyAction','cancel', ...
	'Callback','ui_start_sim', ...
	'Interruptible','off', ...
	'ListboxTop',0, ...
	'Position',[300 10 90 18.75], ...
	'String','Start Simulation', ...
	'Tag','Pushbutton1');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300 30 90 18.75], ...
	'String','100', ...
	'Style','edit', ...
	'Tag','PktsToSimulate');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300 50 90 15], ...
	'String','Packets to simulate', ...
	'Style','text', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.752941176470588 0.752941176470588 0.752941176470588], ...
	'FontSize',9, ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[300 75 110 18.75], ...
	'String','Rx timing offset', ...
	'Style','text', ...
	'Tag','StaticText1');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[410 75 50 18.75], ...
	'String','-3', ...
	'Style','edit', ...
	'Tag','RxTimingOffset');






if nargout > 0, fig = h0; end

⌨️ 快捷键说明

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