📄 iplsplotgui.m
字号:
case '2'
labelty='varlabel'
case '3'
labelty='wavlabel'
end
if (get(handles.MaxYaxisCheck,'Value') == get(handles.MaxYaxisCheck,'min'))
max_yaxis=[];
else
max_yaxis=str2double(get(handles.MaxYAxis,'String'));
end
if (get(handles.noNumOfPLS,'Value') == get(handles.noNumOfPLS,'min'))
optimal_lvl_global=[];
else
optimal_lvl_global=str2double(get(handles.NumberOfPLS,'String'));
end
if (get(handles.numberForPlot,'Value') == get(handles.numberForPlot,'min'))
kindofplot=int2str(get(handles.KindOfPlot,'Value'));
switch kindofplot
case '1'
kindplot='Cum'
case '2'
kindplot='Cum2'
end
else
kindplot=(get(handles.NumPlotType,'String'));
end
iplsplot(Model,labelty,optimal_lvl_global,max_yaxis,kindplot);
% hObject handle to IplsDOPLOT (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function NumPlotType_Callback(hObject, eventdata, handles)
% hObject handle to NumPlotType (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 NumPlotType as text
% str2double(get(hObject,'String')) returns contents of NumPlotType as a double
% --- Executes during object creation, after setting all properties.
function NumPlotType_CreateFcn(hObject, eventdata, handles)
% hObject handle to NumPlotType (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in numberForPlot.
function numberForPlot_Callback(hObject, eventdata, handles)
% hObject handle to numberForPlot (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 numberForPlot
if (get(handles.numberForPlot,'Value') == get(handles.numberForPlot,'min'))
% then checkbox is not checked
set(handles.NumPlotType,'Enable', 'off')
else
set(handles.NumPlotType,'Enable', 'on')
end
function MaxYAxis_Callback(hObject, eventdata, handles)
% hObject handle to MaxYAxis (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 MaxYAxis as text
% str2double(get(hObject,'String')) returns contents of MaxYAxis as a double
% --- Executes during object creation, after setting all properties.
function MaxYAxis_CreateFcn(hObject, eventdata, handles)
% hObject handle to MaxYAxis (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in MaxYaxisCheck.
function MaxYaxisCheck_Callback(hObject, eventdata, handles)
% hObject handle to MaxYaxisCheck (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 MaxYaxisCheck
if (get(handles.MaxYaxisCheck,'Value') == get(handles.MaxYaxisCheck,'min'))
% then checkbox is not checked
set(handles.MaxYAxis,'Enable', 'off')
else
set(handles.MaxYAxis,'Enable', 'on')
end
function PLSRMSEIntervals_Callback(hObject, eventdata, handles)
% hObject handle to PLSRMSEIntervals (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 PLSRMSEIntervals as text
% str2double(get(hObject,'String')) returns contents of PLSRMSEIntervals as a double
% --- Executes during object creation, after setting all properties.
function PLSRMSEIntervals_CreateFcn(hObject, eventdata, handles)
% hObject handle to PLSRMSEIntervals (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in checkPLSRMSE.
function checkPLSRMSE_Callback(hObject, eventdata, handles)
% hObject handle to checkPLSRMSE (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 checkPLSRMSE
if (get(handles.checkPLSRMSE,'Value') == get(handles.checkPLSRMSE,'min'))
% then checkbox is not checked
set(handles.PLSRMSEIntervals,'Enable', 'off')
else
set(handles.PLSRMSEIntervals,'Enable', 'on')
end
% --- Executes on button press in InfoIntervals.
function InfoIntervals_Callback(hObject, eventdata, handles)
% hObject handle to InfoIntervals (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
list_ModelMatrix = get(handles.ModelMatrix,'String')
index_ModelMatrix = get(handles.ModelMatrix,'Value')
Model = evalin('base',list_ModelMatrix{index_ModelMatrix(1)})
intervals(Model)
% --- Executes on button press in PLMRMSE.
function PLMRMSE_Callback(hObject, eventdata, handles)
% hObject handle to PLMRMSE (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
varsModel = get(handles.ModelMatrix,'String');
var_indexModel = get(handles.ModelMatrix,'Value');
ModelMatrix = evalin('base',varsModel{var_indexModel(1)});
figure
PLSRMSEint=str2double(get(handles.PLSRMSEIntervals,'String'));
if (get(handles.checkPLSRMSE,'Value') == get(handles.checkPLSRMSE,'min'))
% then checkbox is not checked
plsrmse(ModelMatrix,0);
else
plsrmse(ModelMatrix,PLSRMSEint);
end
% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton9 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
PlsvsmGUI
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -