📄 exportresults.m
字号:
if (get(handles.chkbx_pronymodes,'Value') == get(handles.chkbx_pronymodes,'Max'))
Data(8)= {[IIGuiData.test_time IIGuiData.test_data IIGuiData.ai]};
else
Data(8)={'Empty'};
end
% Export the results associated with the Pole Diagram of Prony Analysis GUI
if (get(handles.chkbx_poles,'Value') == get(handles.chkbx_poles,'Max'))
Data(9)={IIGuiData.idennz};
else
Data(9)={'Empty'};
end
if (get(handles.chkbx_polezero,'Value') == get(handles.chkbx_polezero,'Max'))
Data(10)={[IIGuiData.inummz IIGuiData.idennz]};
else
Data(10)={'Empty'};
end
if (get(handles.chkbx_sortedres,'Value') == get(handles.chkbx_sortedres,'Max'))
index=1:size(IIGuiData.SUB_IND,2);
index=index';
Data(11)={[index IIGuiData.aa_list]};
else
Data(11)={'Empty'};
end
if (get(handles.chkbx_allres,'Value') == get(handles.chkbx_allres,'Max'))
index=1:size(IIGuiData.res_SUBIND,2);
index=index';
Data(12)={[index IIGuiData.all_res]};
else
Data(12)={'Empty'};
end
if (get(handles.chkbx_seerror,'Value') == get(handles.chkbx_seerror,'Max'))
Data(13)={[IIGuiData.test_time IIGuiData.seerror]};
else
Data(13)={'Empty'};
end
if (get(handles.chkbx_energy,'Value') == get(handles.chkbx_energy,'Max'))
index=1:size(IIGuiData.res_SUBIND,2);
Data(14)={[index IIGuiData.energy]};
else
Data(14)={'Empty'};
end
end % Close the test of existance of IIGuiData
% Data associated with Compare Sessions GUI
%------------------------------------------------------
%------------------------------------------------------
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);
if (get(handles.chkbx_all3,'Value') == get(handles.chkbx_all3,'Max'))
Data(15)={SaveData};
else
Data(15)={'Empty'};
end
if (get(handles.chkbx_comparepoles,'Value') == get(handles.chkbx_comparepoles,'Max'))
temp={IIIGuiData(1:size_limit).poles};
Data(16)={temp};
else
Data(16)={'Empty'};
end
if (get(handles.chkbx_compareres,'Value') == get(handles.chkbx_compareres,'Max'))
temp={IIIGuiData(1:size_limit).residues};
Data(17)={temp};
else
Data(17)={'Empty'};
end
if (get(handles.chkbx_compareseerror,'Value') == get(handles.chkbx_compareseerror,'Max'))
temp={IIIGuiData(1:size_limit).seerror};
Data(18)={temp};
else
Data(18)={'Empty'};
end
if (get(handles.chkbx_compareenergy,'Value') == get(handles.chkbx_compareenergy,'Max'))
temp={IIIGuiData(1:size_limit).energy};
Data(19)={temp};
else
Data(19)={'Empty'};
end
end % Close the test which checks the existance of IIIGuiData
Data=Data';
fields = [Name]';
DataStruct = cell2struct(Data, fields, 1);
if(ischar(getfield(DataStruct,{1},get(handles.edit_all1,'String')))==1)
Data1=rmfield(DataStruct,get(handles.edit_all1,'String'));
else
Data1=DataStruct;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_raw,'String')))==1)
Data2=rmfield(Data1,get(handles.edit_raw,'String'));
else
Data2=Data1;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_decimated,'String')))==1)
Data3=rmfield(Data2,get(handles.edit_decimated,'String'));
else
Data3=Data2;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_range,'String')))==1)
Data4=rmfield(Data3,get(handles.edit_range,'String'));
else
Data4=Data3;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_preprocess,'String')))==1)
Data5=rmfield(Data4,get(handles.edit_preprocess,'String'));
else
Data5=Data4;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_all2,'String')))==1)
Data6=rmfield(Data5,get(handles.edit_all2,'String'));
else
Data6=Data5;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_pronyfit,'String')))==1)
Data7=rmfield(Data6,get(handles.edit_pronyfit,'String'));
else
Data7=Data6;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_pronymodes,'String')))==1)
Data8=rmfield(Data7,get(handles.edit_pronymodes,'String'));
else
Data8=Data7;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_poles,'String')))==1)
Data9=rmfield(Data8,get(handles.edit_poles,'String'));
else
Data9=Data8;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_polezero,'String')))==1)
Data10=rmfield(Data9,get(handles.edit_polezero,'String'));
else
Data10=Data9;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_sortedres,'String')))==1)
Data11=rmfield(Data10,get(handles.edit_sortedres,'String'));
else
Data11=Data10;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_allres,'String')))==1)
Data12=rmfield(Data11,get(handles.edit_allres,'String'));
else
Data12=Data11;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_seerror,'String')))==1)
Data13=rmfield(Data12,get(handles.edit_seerror,'String'));
else
Data13=Data12;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_energy,'String')))==1)
Data14=rmfield(Data13,get(handles.edit_energy,'String'));
else
Data14=Data13;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_all3,'String')))==1)
Data15=rmfield(Data14,get(handles.edit_all3,'String'));
else
Data15=Data14;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_comparepoles,'String')))==1)
Data16=rmfield(Data15,get(handles.edit_comparepoles,'String'));
else
Data16=Data15;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_compareres,'String')))==1)
Data17=rmfield(Data16,get(handles.edit_compareres,'String'));
else
Data17=Data16;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_compareseerror,'String')))==1)
Data18=rmfield(Data17,get(handles.edit_compareseerror,'String'));
else
Data18=Data17;
end
if(ischar(getfield(DataStruct,{1},get(handles.edit_compareenergy,'String')))==1)
Data19=rmfield(Data18,get(handles.edit_compareenergy,'String'));
else
Data19=Data18;
end
Exported_FileData=Data19;
[exptfile, exptpath] = uiputfile( ...
{'*.mat', 'All mat-Files (*.mat)'},...
'Save as a file');
if isequal(exptfile,0) | isequal(exptpath,0)
ok = 0;
return
end
if ~ismember('.',exptfile)
exptfile = [exptfile '.mat'];
end
exptfullname=fullfile(exptpath,exptfile);
save(exptfullname,'Exported_FileData','-mat');
% --- Executes on button press in push_cancel.
function push_cancel_Callback(hObject, eventdata, handles)
% hObject handle to push_cancel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(gcf);
% --- Executes on button press in chkbx_compareenergy.
function chkbx_compareenergy_Callback(hObject, eventdata, handles)
% hObject handle to chkbx_compareenergy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of chkbx_compareenergy
% --- Executes during object creation, after setting all properties.
function edit_compareenergy_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_compareenergy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function edit_compareenergy_Callback(hObject, eventdata, handles)
% hObject handle to edit_compareenergy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_compareenergy as text
% str2double(get(hObject,'String')) returns contents of edit_compareenergy as a double
% --- Executes on button press in chkbx_energy.
function chkbx_energy_Callback(hObject, eventdata, handles)
% hObject handle to chkbx_energy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of chkbx_energy
% --- Executes during object creation, after setting all properties.
function edit_energy_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_energy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function edit_energy_Callback(hObject, eventdata, handles)
% hObject handle to edit_energy (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_energy as text
% str2double(get(hObject,'String')) returns contents of edit_energy as a double
% --- Executes on button press in chkbx_range.
function chkbx_range_Callback(hObject, eventdata, handles)
% hObject handle to chkbx_range (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of chkbx_range
% --- Executes during object creation, after setting all properties.
function edit_range_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit_range (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function edit_range_Callback(hObject, eventdata, handles)
% hObject handle to edit_range (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit_range as text
% str2double(get(hObject,'String')) returns contents of edit_range as a double
% --- Executes on button press in chkbx_all.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -