function varargout = mainGUI_test(varargin)
% MAINGUI_TEST M-file for mainGUI_test.fig
% MAINGUI_TEST, by itself, creates a new MAINGUI_TEST or raises the existing
% singleton*.
%
% H = MAINGUI_TEST returns the handle to a new MAINGUI_TEST or the handle to
% the existing singleton*.
%
% MAINGUI_TEST('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAINGUI_TEST.M with the given input arguments.
%
% MAINGUI_TEST('Property','Value',...) creates a new MAINGUI_TEST or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before mainGUI_test_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to mainGUI_test_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help mainGUI_test
% Last Modified by GUIDE v2.5 28-Dec-2016 14:18:04
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @mainGUI_test_OpeningFcn, ...
'gui_OutputFcn', @mainGUI_test_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before mainGUI_test is made visible.
function mainGUI_test_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to mainGUI_test (see VARARGIN)
% Choose default command line output for mainGUI_test
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% This sets up the initial plot - only do when we are invisible
% so window can get raised using mainGUI_test.
if strcmp(get(hObject,'Visible'),'off')
plot(rand(5));
end
% UIWAIT makes mainGUI_test wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = mainGUI_test_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
axes(handles.axes1);
% ------------------------------------------------- %
s_temp = get(handles.text_conid,'String'); conid = str2num(s_temp);
string_a = get(handles.edit1,'String'); a_sat = str2double(string_a);
string_e = get(handles.edit2,'String'); e_sat = str2double(string_e);
string_i = get(handles.edit3,'String'); i_sat = str2double(string_i);
string_w = get(handles.edit4,'String'); w_sat = str2double(string_w);
string_RAAN = get(handles.edit5,'String'); RAAN_sat = str2double(string_RAAN);
string_M = get(handles.edit6,'String'); M_sat = str2double(string_M);
string_sat_diameter = get(handles.edit7,'String'); SatDiameter = str2double(string_sat_diameter);
string_sat_power = get(handles.edit8,'String'); Power_Transmitter_Sat1T_BJ = str2double(string_sat_power);
string_sat_datarate = get(handles.edit9,'String'); Datarate_Transmitter_Sat1T_BJ = str2double(string_sat_datarate);
string_ground_diameter = get(handles.edit10,'String'); GroundDiameter = str2double(string_ground_diameter);
string_ground_datarate = get(handles.edit11,'String'); Datarate_Transmitter_SJY_Station = str2double(string_ground_datarate);
% ------------------------------------------------- %
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_index
case 1
cla;
FINAL_Parameter = mainGUI_all(conid,a_sat,e_sat,i_sat,w_sat,RAAN_sat,M_sat,GroundDiameter,Datarate_Transmitter_SJY_Station,SatDiameter,Power_Transmitter_Sat1T_BJ,Datarate_Transmitter_Sat1T_BJ);
Error_String = ['The simulation parameter is not correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', less than 5dB.'];
Correct_String=['The simulation parameter is correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', not less than 5dB.'];
if FINAL_Parameter.CheckFalse == 1
set(handles.text_report,'String',Error_String); error('please check your input');
else
set(handles.text_report,'String',Correct_String);
end
plot(1,FINAL_Parameter.YitaFactor,'r*'); grid on; hold on;
set(handles.text_1st,'String',num2str(FINAL_Parameter.YitaFactor));
case 2
FINAL_Parameter = mainGUI_all(conid,a_sat,e_sat,i_sat,w_sat,RAAN_sat,M_sat,GroundDiameter,Datarate_Transmitter_SJY_Station,SatDiameter,Power_Transmitter_Sat1T_BJ,Datarate_Transmitter_Sat1T_BJ);
Error_String = ['The simulation parameter is not correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', less than 5dB.'];
Correct_String=['The simulation parameter is correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', not less than 5dB.'];
if FINAL_Parameter.CheckFalse == 1
set(handles.text_report,'String',Error_String); error('please check your input');
else
set(handles.text_report,'String',Correct_String);
end
plot(2,FINAL_Parameter.YitaFactor,'b*'); grid on; hold on;
set(handles.text_2nd,'String',num2str(FINAL_Parameter.YitaFactor));
case 3
FINAL_Parameter = mainGUI_all(conid,a_sat,e_sat,i_sat,w_sat,RAAN_sat,M_sat,GroundDiameter,Datarate_Transmitter_SJY_Station,SatDiameter,Power_Transmitter_Sat1T_BJ,Datarate_Transmitter_Sat1T_BJ);
Error_String = ['The simulation parameter is not correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', less than 5dB.'];
Correct_String=['The simulation parameter is correct, the min EbNo[dB] is ',num2str(FINAL_Parameter.EbNo_Check),', not less than 5dB.'];
if FINAL_Parameter.CheckFalse == 1
set(handles.text_report,'String',Error_String); error('please check your input');
else
set(handles.text_report,'String',Correct_String);
end
plot(3,FINAL_Parameter.YitaFactor,'g*'); grid on; hold on;
set(handles.text_3rd,'String',num2str(FINAL_Parameter.YitaFactor));
end
% --------------------------------------------------------------------
function FileMenu_Callback(hObject, eventdata, handles)
% hObject handle to FileMenu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function OpenMenuItem_Callback(hObject, eventdata, handles)
% hObject handle to OpenMenuItem (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
file = uigetfile('*.fig');
if ~isequal(file, 0)
open(file);
end
% -----------------------------------------------------
评论1