⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mwplsgui.m

📁 这是国外一个PLS工具箱
💻 M
📖 第 1 页 / 共 2 页
字号:
       preproc='mscauto';
end
%assignin('base', 'preproc', preproc);

validation =  int2str(get(handles.validation,'Value'))

 switch validation
    case {'1'}
       valMethod='test';
    case '2'
       valMethod='full';
    case '3'
       valMethod='syst111';
    case '4'
       valMethod='syst123';
    case '5'
       valMethod='random';
end


modelname = get(handles.modelname,'String');

numberOfLevel = str2double(get(handles.NumberOfLvlBox,'String'));
numberOfSegments = str2double(get(handles.Segments,'String'));
windowsize =  str2double(get(handles.win,'String'));


Model=mwpls(mymatrix,myYmatrix,numberOfLevel,preproc,windowsize,myAxis,valMethod,numberOfSegments)
assignin('base', modelname, Model);

 


% --- Executes on selection change in preprocessListbox.
function preprocessListbox_Callback(hObject, eventdata, handles)
%contents = get(handles.preprocessListbox,'String')



% hObject    handle to preprocessListbox (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns preprocessListbox contents as cell array
%        contents{get(hObject,'Value')} returns selected item from preprocessListbox


% --- Executes during object creation, after setting all properties.
function preprocessListbox_CreateFcn(hObject, eventdata, handles)
% hObject    handle to preprocessListbox (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox 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 plotGUI.
function plotGUI_Callback(hObject, eventdata, handles)
% hObject    handle to plotGUI (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

mwplsplotGUI


% --- Executes on button press in makeManualIntervals.
function makeManualIntervals_Callback(hObject, eventdata, handles)
%           VIS       NIR       NOISE
%        st1 end1  st2  end2  st3  end3
int_vec=[1   200   201  500   501  926];
assignin('base', 'int_vec',int_vec);
% hObject    handle to makeManualIntervals (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)







function segments_Callback(hObject, eventdata, handles)
% hObject    handle to segments (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 segments as text
%        str2double(get(hObject,'String')) returns contents of segments as a double


% --- Executes during object creation, after setting all properties.
function segments_CreateFcn(hObject, eventdata, handles)
% hObject    handle to segments (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 selection change in Ymatrix.
function Ymatrix_Callback(hObject, eventdata, handles)
% hObject    handle to Ymatrix (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns Ymatrix contents as cell array
%        contents{get(hObject,'Value')} returns selected item from Ymatrix


% --- Executes during object creation, after setting all properties.
function Ymatrix_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Ymatrix (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox 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





function Segments_Callback(hObject, eventdata, handles)
% hObject    handle to Segments (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 Segments as text
%        str2double(get(hObject,'String')) returns contents of Segments as a double


% --- Executes during object creation, after setting all properties.
function Segments_CreateFcn(hObject, eventdata, handles)
% hObject    handle to Segments (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 selection change in validation.
function validation_Callback(hObject, eventdata, handles)
% hObject    handle to validation (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns validation contents as cell array
%        contents{get(hObject,'Value')} returns selected item from validation


% --- Executes during object creation, after setting all properties.
function validation_CreateFcn(hObject, eventdata, handles)
% hObject    handle to validation (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: popupmenu 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 checkAxis.
function checkAxis_Callback(hObject, eventdata, handles)
if (get(handles.checkAxis,'Value') == get(handles.checkAxis,'Max'))
   
     set(handles.ListAxis,'Enable', 'on')
    
else
     set(handles.ListAxis,'Enable', 'off')
     
end
% hObject    handle to checkAxis (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 checkAxis




% --- Executes when figure1 is resized.
function figure1_ResizeFcn(hObject, eventdata, handles)
% hObject    handle to figure1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function modelname_Callback(hObject, eventdata, handles)
% hObject    handle to modelname (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 modelname as text
%        str2double(get(hObject,'String')) returns contents of modelname as a double


% --- Executes during object creation, after setting all properties.
function modelname_CreateFcn(hObject, eventdata, handles)
% hObject    handle to modelname (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 during object creation, after setting all properties.
function NameLabel_CreateFcn(hObject, eventdata, handles)
% hObject    handle to NameLabel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called


% --- Executes during object deletion, before destroying properties.
function modelname_DeleteFcn(hObject, eventdata, handles)
% hObject    handle to modelname (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes during object deletion, before destroying properties.
function NameLabel_DeleteFcn(hObject, eventdata, handles)
% hObject    handle to NameLabel (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)





function win_Callback(hObject, eventdata, handles)
% hObject    handle to win (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 win as text
%        str2double(get(hObject,'String')) returns contents of win as a double


% --- Executes during object creation, after setting all properties.
function win_CreateFcn(hObject, eventdata, handles)
% hObject    handle to win (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


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -