📄 exportresults.m
字号:
function varargout = exportresults(varargin)
% EXPORTRESULTS M-file for exportresults.fig
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help exportresults
% Last Modified by GUIDE v2.5 06-Feb-2006 12:19:41
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @exportresults_OpeningFcn, ...
'gui_OutputFcn', @exportresults_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(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 exportresults is made visible.
function exportresults_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 exportresults (see VARARGIN)
% Choose default command line output for exportresults
handles.output = hObject;
set(hObject,'Color','white');
% Set the toolbar for the figure
pronytoolbar(hObject,'on');
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes exportresults wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = exportresults_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 push_exportwspace.
function push_exportwspace_Callback(hObject, eventdata, handles)
% hObject handle to push_exportwspace (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if(evalin('base','exist(''PronyData'',''var'')')==0)
msgbox('Please Prepare Prony Analysis Data to Export the Results','Prepare Prony Analysis GUI Data is Empty','replace')
whitebg('white');
else
IGuiData=evalin('base','PronyData');
if (get(handles.chkbx_all1,'Value') == get(handles.chkbx_all1,'Max'))
assignin('base',get(handles.edit_all1,'String'),IGuiData)
end
if (get(handles.chkbx_raw,'Value') == get(handles.chkbx_raw,'Max'))
name=get(handles.edit_raw,'String');
name= struct('x',[],'y',[]);
name.x=IGuiData.x_val;
name.y=IGuiData.y_val;
assignin('base',get(handles.edit_raw,'String'),name);
end
if (get(handles.chkbx_range,'Value') == get(handles.chkbx_range,'Max'))
% then checkbox is checked-take approriate action
name=get(handles.edit_range,'String');
name= struct('x',[],'y',[]);
name.x=IGuiData.window_x;
name.y=IGuiData.window_y;
assignin('base',get(handles.edit_range,'String'),name);
end
if (get(handles.chkbx_decimated,'Value') == get(handles.chkbx_decimated,'Max'))
% then checkbox is checked-take approriate action
name=get(handles.edit_decimated,'String');
name= struct('x',[],'y',[]);
name.x=IGuiData.deci_x;
name.y=IGuiData.deci_y;
assignin('base',get(handles.edit_decimated,'String'),name);
end
if (get(handles.chkbx_preprocess,'Value') == get(handles.chkbx_preprocess,'Max'))
% then checkbox is checked-take approriate action
name=get(handles.edit_preprocess,'String');
name= struct('x',[],'y',[]);
name.x=IGuiData.dp_x;
name.y=IGuiData.dp_y;
assignin('base',get(handles.edit_preprocess,'String'),name);
end
end % outermost condition which checks if the data exists or not
% Export the data related to Perform Prony Analysis GUI
%----------------------------------------------------------------------
%----------------------------------------------------------------------
if(evalin('base','exist(''IIGuiData'',''var'')')==0)
msgbox('Please Perform Prony Analysis to Export the Results','Perform Prony Analysis GUI Data is Empty','replace')
whitebg('white');
else
IIGuiData=evalin('base','IIGuiData');
if (get(handles.chkbx_all2,'Value') == get(handles.chkbx_all2,'Max'))
assignin('base',get(handles.edit_preprocess,'String'),IIGuiData);
end
if (get(handles.chkbx_pronyfit,'Value') == get(handles.chkbx_pronyfit,'Max'))
name=get(handles.edit_pronyfit,'String');
name= struct('x',[],'y',[],'prony_y',[],'f',[],'fft_y',[],'fft_prony_y',[]);
name.x=IIGuiData.test_time;
name.y=IIGuiData.test_data;
name.prony_y=IIGuiData.iapp;
name.f=IIGuiData.f1;
name.fft_y=IIGuiData.fft_data1;
name.fft_prony_y=IIGuiData.fft_iapp1;
assignin('base',get(handles.edit_pronyfit,'String'),name);
end
% Export the results associated with the second plot of Prony Analysis GUI
if (get(handles.chkbx_pronymodes,'Value') == get(handles.chkbx_pronymodes,'Max'))
name=get(handles.edit_pronymodes,'String');
name=struct('x',[],'y',[],'prony_y',[],'f',[],'fft_y',[],'fft_prony_y',[]);
name.x=IIGuiData.test_time;
name.y=IIGuiData.test_data;
name.prony_y=IIGuiData.ai;
name.f=IIGuiData.f2;
name.fft_y=IIGuiData.fft_data2;
name.fft_prony_y=IIGuiData.fft_iapp2;
assignin('base',get(handles.edit_pronymodes,'String'),name);
end
% Export the results associated with the Pole Diagram of Prony Analysis GUI
if (get(handles.chkbx_poles,'Value') == get(handles.chkbx_poles,'Max'))
name=get(handles.edit_poles,'String');
name=struct('zeros',[],'poles',[]);
name.poles=IIGuiData.idennz;
name.zeros=0;
assignin('base',get(handles.edit_poles,'String'),name);
end
% Export the results associated with the Pole-Zero Diagram of Prony Analysis GUI
if (get(handles.chkbx_polezero,'Value') == get(handles.chkbx_polezero,'Max'))
name=get(handles.edit_polezero,'String');
name=struct('zeros',[],'poles',[]);
name.poles=IIGuiData.idennz;
name.zeros=IIGuiData.inummz;
assignin('base',get(handles.edit_polezero,'String'),name);
end
% Export the results associated with the Sorted Residues of Prony Analysis GUI
if (get(handles.chkbx_sortedres,'Value') == get(handles.chkbx_sortedres,'Max'))
name=get(handles.edit_sortedres,'String');
name=struct('index',[],'residues',[]);
name.index=1:size(IIGuiData.SUB_IND,2);
name.residues=IIGuiData.aa_list;
assignin('base',get(handles.edit_sortedres,'String'),name);
end
% Export the results associated with the All Residues of Prony Analysis GUI
if (get(handles.chkbx_allres,'Value') == get(handles.chkbx_allres,'Max'))
name=get(handles.edit_allres,'String');
name=struct('index',[],'residues',[]);
name.index=1:size(IIGuiData.res_SUBIND,2);
name.residues=IIGuiData.all_res;
assignin('base',get(handles.edit_allres,'String'),name);
end
% Export the results associated with the Pole Diagram of Prony Analysis GUI
if (get(handles.chkbx_seerror,'Value') == get(handles.chkbx_seerror,'Max'))
name=get(handles.edit_seerror,'String');
name=struct('time',[],'squarederror',[]);
name.time=IIGuiData.test_time;
name.squarederror=IIGuiData.seerror;
assignin('base',get(handles.edit_seerror,'String'),name);
end
% Export the results associated with the All Energy of Prony Analysis GUI
if (get(handles.chkbx_energy,'Value') == get(handles.chkbx_energy,'Max'))
name=get(handles.edit_energy,'String');
name=struct('index',[],'energy',[]);
name.index=1:size(IIGuiData.res_SUBIND,2);
name.energy=IIGuiData.energy;
assignin('base',get(handles.edit_energy,'String'),name);
end
end % Outermost condition which checks if the data is empty
% Export Compare Sessions GUI Data
%----------------------------------------------------------------------
%----------------------------------------------------------------------
if(evalin('base','exist(''IIIGuiData'',''var'')')==0)
msgbox('Please Compare Sessions to Export the Results','Compare Sessions GUI Data is Empty','replace')
whitebg('white');
else
IIIGuiData=evalin('base','IIIGuiData');
SaveData=evalin('base','SaveData');
size_limit=size(IIIGuiData,2);
% Export the results associated with the All data of Compare Sessions GUI
if (get(handles.chkbx_all3,'Value') == get(handles.chkbx_all3,'Max'))
assignin('base',get(handles.edit_all3,'String'),SaveData)
end
% Export the Poles data
if (get(handles.chkbx_comparepoles,'Value') == get(handles.chkbx_comparepoles,'Max'))
assignin('base',get(handles.edit_comparepoles,'String'),{IIIGuiData(1:size_limit).poles})
end
% Export the Residues data
if (get(handles.chkbx_compareres,'Value') == get(handles.chkbx_compareres,'Max'))
assignin('base',get(handles.edit_compareres,'String'),{IIIGuiData(1:size_limit).residues})
end
% Export the Squared Error Data
if (get(handles.chkbx_compareseerror,'Value') == get(handles.chkbx_compareseerror,'Max'))
assignin('base',get(handles.edit_compareseerror,'String'),{IIIGuiData(1:size_limit).seerror})
end
% Export the Energy data
if (get(handles.chkbx_compareenergy,'Value') == get(handles.chkbx_compareenergy,'Max'))
assignin('base',get(handles.edit_compareenergy,'String'),{IIIGuiData(1:size_limit).energy})
end
end % Outermost condition to check if the data exists
% --- Executes on button press in push_exporthelp.
function push_exportfile_Callback(hObject, eventdata, handles)
% hObject handle to push_exporthelp (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Name(1)={get(handles.edit_all1,'String')};
Name(2)={get(handles.edit_raw,'String')};
Name(3)={get(handles.edit_decimated,'String')};
Name(4)={get(handles.edit_range,'String')};
Name(5)={get(handles.edit_preprocess,'String')};
Name(6)={get(handles.edit_all2,'String')};
Name(7)={get(handles.edit_pronyfit,'String')};
Name(8)={get(handles.edit_pronymodes,'String')};
Name(9)={get(handles.edit_poles,'String')};
Name(10)={get(handles.edit_polezero,'String')};
Name(11)={get(handles.edit_sortedres,'String')};
Name(12)={get(handles.edit_allres,'String')};
Name(13)={get(handles.edit_seerror,'String')};
Name(14)={get(handles.edit_energy,'String')};
Name(15)={get(handles.edit_all3,'String')};
Name(16)={get(handles.edit_comparepoles,'String')};
Name(17)={get(handles.edit_compareres,'String')};
Name(18)={get(handles.edit_compareseerror,'String')};
Name(19)={get(handles.edit_compareenergy,'String')};
if(evalin('base','exist(''PronyData'',''var'')')==0)
msgbox('Please Prepare Prony Analysis Data to Export the Results','Prepare Prony Analysis GUI Data is Empty','replace')
whitebg('white');
else
IGuiData=evalin('base','PronyData');
if (get(handles.chkbx_all1,'Value') == get(handles.chkbx_all1,'Max'))
% then checkbox is checked-take approriate action
Data(1)={IGuiData};
else
Data(1)={'Empty'};
end
if (get(handles.chkbx_raw,'Value') == get(handles.chkbx_raw,'Max'))
% then checkbox is checked-take approriate action
Data(2)={[IGuiData.x_val IGuiData.y_val]};
else
Data(2)={'Empty'};
end
if (get(handles.chkbx_decimated,'Value') == get(handles.chkbx_decimated,'Max'))
% then checkbox is checked-take approriate action
Data(3)={[IGuiData.deci_x IGuiData.deci_y]};
else
Data(3)={'Empty'};
end
if (get(handles.chkbx_range,'Value') == get(handles.chkbx_range,'Max'))
% then checkbox is checked-take approriate action
Data(4)={[IGuiData.window_x IGuiData.window_y]};
else
Data(4)={'Empty'};
end
if (get(handles.chkbx_preprocess,'Value') == get(handles.chkbx_preprocess,'Max'))
% then checkbox is checked-take approriate action
Data(5)={[IGuiData.dp_x IGuiData.dp_y]};
else
Data(5)={'Empty'};
end
end % close the test of existance of IGuiData
% Data associated with Perform Prony Analysis GUI
%------------------------------------------------------
%------------------------------------------------------
if(evalin('base','exist(''IIGuiData'',''var'')')==0)
msgbox('Please Perform Prony Analysis to Export the Results','Perform Prony Analysis GUI Data is Empty','replace')
whitebg('white');
else
IIGuiData=evalin('base','IIGuiData');
if (get(handles.chkbx_all2,'Value') == get(handles.chkbx_all2,'Max'))
Data(6)={IIGuiData};
else
Data(6)={'Empty'};
end
if (get(handles.chkbx_pronyfit,'Value') == get(handles.chkbx_pronyfit,'Max'))
Data(7)= {[IIGuiData.test_time IIGuiData.test_data IIGuiData.iapp ]};
else
Data(7)={'Empty'};
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -