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

📄 biplsgui.m

📁 这是国外一个PLS工具箱
💻 M
📖 第 1 页 / 共 2 页
字号:
    Modelbipls=bipls(mymatrix,myYmatrix,numberOfComponents,preproc,Intervals,[],valMethod,numberOfSegments);
else
    Modelipls=bipls(mymatrix,myYmatrix,numberOfComponents,preproc,numberOfIntervals,myAxis,valMethod,numberOfSegments);
end

assignin('base', modelname, Modelbipls)

 


% --- 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






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



% --- 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)




% --- Executes on selection change in intervalsMatrix.
function intervalsMatrix_Callback(hObject, eventdata, handles)
% hObject    handle to intervalsMatrix (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 intervalsMatrix contents as cell array
%        contents{get(hObject,'Value')} returns selected item from intervalsMatrix


% --- Executes during object creation, after setting all properties.
function intervalsMatrix_CreateFcn(hObject, eventdata, handles)
% hObject    handle to intervalsMatrix (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 checkIntervals.
function checkIntervals_Callback(hObject, eventdata, handles)
if (get(handles.checkIntervals,'Value') == get(handles.checkIntervals,'Max'))
    % then checkbox is not checked 
     set(handles.IntervalsBox,'Enable', 'off')
     set(handles.IntervalsMatrix,'Enable', 'on')
else
     set(handles.IntervalsBox,'Enable', 'on')
     set(handles.IntervalsMatrix,'Enable', 'off') 
end
% hObject    handle to checkIntervals (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 checkIntervals




% --- Executes on selection change in IntervalsMatrix.
function IntervalsMatrix_Callback(hObject, eventdata, handles)
% hObject    handle to IntervalsMatrix (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 IntervalsMatrix contents as cell array
%        contents{get(hObject,'Value')} returns selected item from IntervalsMatrix


% --- Executes during object creation, after setting all properties.
function IntervalsMatrix_CreateFcn(hObject, eventdata, handles)
% hObject    handle to IntervalsMatrix (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 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 NameOfModelLabel_CreateFcn(hObject, eventdata, handles)
% hObject    handle to NameOfModelLabel (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 NameOfModelLabel_DeleteFcn(hObject, eventdata, handles)
% hObject    handle to NameOfModelLabel (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 BiplsTableButton.
function BiplsTableButton_Callback(hObject, eventdata, handles)
% hObject    handle to BiplsTableButton (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

list_entriesXmatrix = get(handles.Xmatrix,'String');
index_selectedXmatrix = get(handles.Xmatrix,'Value');
mymatrix = evalin('base',list_entriesXmatrix{index_selectedXmatrix(1)});

biplstable(mymatrix)

⌨️ 快捷键说明

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