Commit fd76e20a authored by Simone Liuzzo's avatar Simone Liuzzo

added button to save fitted model (for use by simulator tango device

parent 39fe4358
No preview for this file type
......@@ -22,7 +22,7 @@ function varargout = qempanel2(varargin)
% Edit the above text to modify the response to help qempanel2
% Last Modified by GUIDE v2.5 08-Feb-2019 15:41:54
% Last Modified by GUIDE v2.5 30-Apr-2019 16:33:02
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
......@@ -984,3 +984,29 @@ if get(hObject,'Value') == 1
set(handles.statustext,'String','new figures done');
% --- Executes on button press in SendFitToSimlator.
function SendFitToSimlator_Callback(hObject, eventdata, handles)
% hObject handle to SendFitToSimlator (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global qemres qemb semres
fittedmodel = qemb(2).at;
errtab = atcreateerrortable(fittedmodel); % empty error table
cortab = atgetcorrectiontable(fittedmodel,fittedmodel); % zeros correction table
tnow = now();
mkdir(errmodpath); % create directory to save to
save(fullfile(errmodpath,['fitmod' datestr(tnow,'yyyy_mm_dd_HH_MM_SS')]),'fittedmodel','errtab','cortab')
warning('updated properties of sys/ringsimulator/fittedmodel');
set(handles.statustext,'String',['Fitted model saved in: ' errmodpath]);
set(handles.statustext,'String','Fitted model NOT saved. Either fit not performed or no permission to write in theory folder');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment