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

📄 ui_start.m

📁 空时码和mimoofdm系统相结合的matlab程序
💻 M
字号:
%**************************************************************************
%This program draws the GUI.
%**************************************************************************


h0 = figure('Units','points', ...
	'Color',[0.8 0.8 0.8], ...
	'Colormap','default', ...
	'FileName','start.m', ...
	'MenuBar','none', ...
	'Name','Space-Time Trellis Coding ', ...
	'NumberTitle','off', ...
	'PaperPosition',[18 180 576 432], ...
	'PaperUnits','points', ...
	'Position',[230 150 275.25 350.5], ...
	'Resize','off', ...
	'Tag','UIFigure', ...
	'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 317.5 93.75 18.75], ...
	'String','Packet Length (Symbols)', ...
	'Style','text', ...
    'ToolTipString','This is the length of the frame in symbols', ...
    'ForegroundColor','b', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[150.75 317.5 93.75 18.75], ...
	'String','130', ...
	'Style','edit', ...
	'Tag','FrmLen');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 287.5 93.75 18.75], ...
	'String','Number of Packets', ...
	'Style','text', ...
    'ToolTipString','This is the number of packets to be transmitted', ...
    'ForegroundColor','b', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[150.75 287.5 93.75 18.75], ...
	'String','100', ...
	'Style','edit', ...
	'Tag','NumofPkt');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 257.5 93.75 18.75], ...
	'String','Channel Model', ...
	'Style','text', ...
    'ToolTipString','This is the number of packets to be transmitted', ...
    'ForegroundColor','b', ...
	'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 247.5 93.75 18.75], ...
	'String','AWGN', ...
	'Style','checkbox', ...
	'Tag','AWGN', ...
    'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[78.75 247.5 93.75 18.75], ...
	'String','Rayleigh', ...
	'Style','checkbox', ...
	'Tag','Rayleigh');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 230.5 200.75 13.5], ...
	'String','Modulation & Number of Trellis States', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','Choose from 4, 8, 16 states or delay diversity', ..., ...
    'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 210.5 93.75 13.5], ...
	'String','4 PSK', ...
	'Style','text', ...
    'ForegroundColor','k', ...
    'ToolTipString','', ..., ...
    'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[88.75 210.5 93.75 13.5], ...
	'String','8 PSK', ...
	'Style','text', ...
    'ForegroundColor','k', ...
    'ToolTipString','', ..., ...
    'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[158.75 210.5 93.75 13.5], ...
	'String','16 QAM', ...
	'Style','text', ...
    'ForegroundColor','k', ...
    'ToolTipString','', ..., ...
    'Tag','StaticText1');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 190.5 93.75 13.5], ...
	'String','4 State', ...
	'Style','radiobutton', ...
	'Tag','4state_4psk', ...
	'Enable','inactive', ...
	'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 170.5 93.75 13.5], ...
	'String','8 State', ...
	'Style','radiobutton', ...
	'Tag','8state_4psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 150.5 93.75 13.5], ...
	'String','16 State', ...
	'Style','radiobutton', ...
	'Tag','16state_4psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 130.5 93.75 13.5], ...
	'String','32 State', ...
	'Style','radiobutton', ...
	'Tag','32state_4psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[88.75 190.5 93.75 13.5], ...
	'String','8 State', ...
	'Style','radiobutton', ...
	'Tag','8state_8psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[88.75 170.5 93.75 13.5], ...
	'String','16 State', ...
	'Style','radiobutton', ...
	'Tag','16state_8psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[88.75 150.5 93.75 13.5], ...
	'String','32 State', ...
	'Style','radiobutton', ...
	'Tag','32state_8psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[88.75 130.5 93.75 13.5], ...
	'String','Delay Diversity', ...
	'Style','radiobutton', ...
	'Tag','DelayDiv_8psk');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[158.75 190.5 93.75 13.5], ...
	'String','16 State', ...
	'Style','radiobutton', ...
	'Tag','16state_16qam');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[158.75 170.5 93.75 13.5], ...
	'String','Delay Diversity', ...
	'Style','radiobutton', ...
	'Tag','DelayDiv_16qam');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 110.5 203.75 13.5], ...
	'String','Receive Antenna Diversity (Two Transmit Antennas)', ...
	'Style','text', ...
    'ForegroundColor','b', ...
    'ToolTipString','The coding is for a 2x2 or a 2x1 system only', ...
    'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 90.5 103.75 13.5], ...
	'String','x2 Rx', ...
	'Style','checkbox', ...
	'Tag','2Rx', ...
    'Value',1);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[58.75 90.5 103.75 13.5], ...
	'String','x1 Rx', ...
	'Style','checkbox', ...
	'Tag','1Rx');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 70.5 103.75 13.5], ...
	'String','Channel Estimation', ...
	'Style','checkbox', ...
    'ForegroundColor','b', ...
    'ToolTipString','Channel estimation is based on MMSE', ...
	'Tag','Channel_Est', ...
    'Value',0);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[108.75 70.5 103.75 13.5], ...
	'String','Receive Correlation', ...
	'Style','checkbox', ...
    'ForegroundColor','b', ...
    'ToolTipString','Coding available only for 2x2 systems. Enter correlation coefficient value between 0 and 1', ...
	'Tag','Rx_corr', ...
    'Value',0);
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[220.75 70.5 23.75 18.75], ...
	'String','0', ...
	'Style','edit', ...
	'Tag','corr_value');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[220.75 50.5 53.75 18.75], ...
	'String','Correlation', ...
	'Style','text', ...
    'ForegroundColor','r', ...
   'Tag','StaticText1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[220.75 40.5 53.75 18.75], ...
	'String','Coefficient', ...
	'Style','text', ...
    'ForegroundColor','r', ...
   'Tag','StaticText1');

h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Callback','ui_check_params', ...
	'ListboxTop',0, ...
	'Position',[18.75 50.5 103.75 13.5], ...
	'String','Save Run ?', ...
	'Style','checkbox', ...
    'ToolTipString','File will be saved in the current directory', ...
    'ForegroundColor','b', ...
	'Tag','Savefile');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Callback','ui_check_params', ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[88.75 30.5 93.75 18.75], ...
	'String','', ...
	'Style','edit', ...
    'Visible','Off', ...
    'Tag','FileName');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'HorizontalAlignment','left', ...
	'ListboxTop',0, ...
	'Position',[18.75 30.5 60.75 15.5], ...
	'String','File Name', ...
	'Style','text', ...
    'ForegroundColor','r', ...
    'FontWeight','bold', ...
    'Visible','Off', ...
   'Tag','filename1');
h1 = uicontrol('Parent',h0, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'BusyAction','cancel', ...
	'Callback','ui_start_sim', ...
	'Interruptible','off', ...
	'ListboxTop',0, ...
	'Position',[168.75 5.5 93.75 18.75], ...
	'String','Start Simulation', ...
    'ForegroundColor',[0 0.4 0], ...
    'FontWeight','bold', ...
 	'Tag','Pushbutton1');

⌨️ 快捷键说明

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