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

📄 ui_read_options.m

📁 多输入多输出系统不同收发天线对系统性能的影响
💻 M
字号:
function sim_options = ui_read_options
%**************************************************************************
%This program inputs the GUI choices.
%**************************************************************************

% frame length, in symbols
Frm_length = eval(get(findobj('Tag', 'FrmLen'),'String'));

% number of packets
NumberofPackets = eval(get(findobj('Tag', 'NumofPkt'),'String'));

% Channel models
if get(findobj('Tag', 'AWGN'),'Value')
   chan_model = 'AWGN';
elseif get(findobj('Tag', 'Rayleigh'),'Value')
   chan_model = 'Rayleigh';
end

% Rx Diversity options
oneRx = get(findobj('Tag', '1Rx'),'Value');
if oneRx==1
    rx_div=1;
end
twoRx = get(findobj('Tag', '2Rx'),'Value');
if twoRx==1
    rx_div=2;
end

% channel estimation
ch_est=get(findobj('Tag', 'Channel_Est'),'Value');

%receive correlation
rx_corr=get(findobj('Tag', 'Rx_corr'),'Value');

% trellis options
if get(findobj('Tag', '4state_4psk'),'Value')
   option = '4_State_4PSK';
elseif get(findobj('Tag', '8state_4psk'),'Value')
   option = '8_State_4PSK';
elseif get(findobj('Tag', '16state_4psk'),'Value')
   option = '16_State_4PSK';
elseif get(findobj('Tag', '32state_4psk'),'Value')
   option = '32_State_4PSK';
elseif get(findobj('Tag', '8state_8psk'),'Value')
   option = '8_State_8PSK';
elseif get(findobj('Tag', '16state_8psk'),'Value')
   option = '16_State_8PSK';
elseif get(findobj('Tag', '32state_8psk'),'Value')
   option = '32_State_8PSK';
elseif get(findobj('Tag', 'DelayDiv_8psk'),'Value')
   option = 'DelayDiv_8PSK';
elseif get(findobj('Tag', '16state_16qam'),'Value')
   option = '16_State_16qam';
elseif get(findobj('Tag', 'DelayDiv_16qam'),'Value')
   option = 'DelayDiv_16qam';
end

%Save file
savefile=get(findobj('Tag', 'Savefile'),'Value');
filename = get(findobj('Tag', 'FileName'),'String');

str1=filename;
if isempty(str1) & savefile==1
uiwait(errordlg('Enter file name!! Program will exit to command line.','Invalid Input','Modal'));
return;
end

%correlation coefficient
Rx_corr=get(findobj('Tag', 'Rx_corr'),'Value');
corr_val_str=eval(get(findobj('Tag', 'corr_value'),'String'));
if corr_val_str==0 & Rx_corr==1
uiwait(errordlg('Enter correlation coefficient value between 0 and 1!! Program will exit to command line.','Invalid Input','Modal'));
return;
end


sim_options = struct('FrmLen', Frm_length, ...
   'NumberofPackets', NumberofPackets, ...
   'ChannelModel',chan_model, ...
   'Option', option, ...
   'RxDiv',rx_div, ...
   'Channel_Est',ch_est, ...
   'Rx_corr', rx_corr, ...
   'corr_value',corr_val_str, ...
   'Savefile',savefile,...
   'FileName',filename);

⌨️ 快捷键说明

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