matlab guidata两个,Matlab
%在控件本身函數(shù)中用hObject調(diào)用
%在別的函數(shù)中,需要使用handles調(diào)用
function?varargout?=?TestGUI(varargin)
%?TESTGUI?MATLAB?code?for?TestGUI.fig
%??????TESTGUI,?by?itself,?creates?a?new?TESTGUI?or?raises?the?existing
%??????singleton*.
%
%??????H?=?TESTGUI?returns?the?handle?to?a?new?TESTGUI?or?the?handle?to
%??????the?existing?singleton*.
%
%??????TESTGUI('CALLBACK',hObject,eventData,handles,...)?calls?the?local
%??????function?named?CALLBACK?in?TESTGUI.M?with?the?given?input?arguments.
%
%??????TESTGUI('Property','Value',...)?creates?a?new?TESTGUI?or?raises?the
%??????existing?singleton*.??Starting?from?the?left,?property?value?pairs?are
%??????applied?to?the?GUI?before?TestGUI_OpeningFcn?gets?called.??An
%??????unrecognized?property?name?or?invalid?value?makes?property?application
%??????stop.??All?inputs?are?passed?to?TestGUI_OpeningFcn?via?varargin.
%
%??????*See?GUI?Options?on?GUIDE's?Tools?menu.??Choose?"GUI?allows?only?one
%??????instance?to?run?(singleton)".
%
%?See?also:?GUIDE,?GUIDATA,?GUIHANDLES
%?Edit?the?above?text?to?modify?the?response?to?help?TestGUI
%?Last?Modified?by?GUIDE?v2.5?06-Oct-2015?17:26:26
%?Begin?initialization?code?-?DO?NOT?EDIT
global?isRight;
isRight?=?0;
gui_Singleton?=?1;
gui_State?=?struct('gui_Name',???????mfilename,?...
'gui_Singleton',??gui_Singleton,?...
'gui_OpeningFcn',?@TestGUI_OpeningFcn,?...
'gui_OutputFcn',??@TestGUI_OutputFcn,?...
'gui_LayoutFcn',??[]?,?...
'gui_Callback',???[]);
if?nargin?&&?ischar(varargin{1})
gui_State.gui_Callback?=?str2func(varargin{1});
end
if?nargout
[varargout{1:nargout}]?=?gui_mainfcn(gui_State,?varargin{:});
else
gui_mainfcn(gui_State,?varargin{:});
end
%?End?initialization?code?-?DO?NOT?EDIT
%這里練習(xí)使用helpdlg
if?isRight
helpdlg('第一步導(dǎo)入圖像/視頻;第二步選擇功能;第三步點(diǎn)擊‘Start’開(kāi)始處理圖像/視頻(多幅圖像/視頻多次點(diǎn)擊);第四步點(diǎn)擊‘Exit’退出界面');
end
%?---?Executes?just?before?TestGUI?is?made?visible.
function?TestGUI_OpeningFcn(hObject,?eventdata,?handles,?varargin)
%?This?function?has?no?output?args,?see?OutputFcn.
%?hObject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?varargin???command?line?arguments?to?TestGUI?(see?VARARGIN)
%?定義全局變量
global?isVideo;
isVideo?=?0;
global?isImage;
isImage?=?0;
global?Count;
Count?=?0;
global?isRight;
%?Choose?default?command?line?output?for?TestGUI
handles.output?=?hObject;
%?Update?handles?structure
guidata(hObject,?handles);
%?UIWAIT?makes?TestGUI?wait?for?user?response?(see?UIRESUME)
%?uiwait(handles.figure1);
%簡(jiǎn)單的密碼驗(yàn)證,這里主要是練習(xí)使用inputdlg
prompt?=?{'Name?=?hen','Code?=?1989'};
title?=?'請(qǐng)輸入用戶名和密碼';
lines?=?[2,1]';
AvailNameCode?=?{'hen','1989'};
%?FalseNameCode?=?{'***','***'};
FalseNameCode?=?AvailNameCode;
answer?=?inputdlg(prompt,title,lines,FalseNameCode);
if??length(answer)?==?2?&&?strcmp(answer{1},AvailNameCode{1})?&&?strcmp(answer{2},AvailNameCode{2})
msgbox('正確,點(diǎn)擊?確定?以繼續(xù)');????%練習(xí)使用msgbox
isRight?=?1;
else
errordlg('用戶名或密碼錯(cuò)誤');
%?????close(gcf);?%但是會(huì)導(dǎo)致崩潰
end
%?---?Outputs?from?this?function?are?returned?to?the?command?line.
function?varargout?=?TestGUI_OutputFcn(hObject,?eventdata,?handles)
%?varargout??cell?array?for?returning?output?args?(see?VARARGOUT);
%?hObject????handle?to?figure
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?Get?default?command?line?output?from?handles?structure
global?isRight;
varargout{1}?=?handles.output;
if?~isRight
close(gcf);?%放到這里就不會(huì)導(dǎo)致程序崩潰了
end
%?--------------------------------------------------------------------
function?ImageIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?ImageIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?--------------------------------------------------------------------
function?VideoIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?VideoIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?--------------------------------------------------------------------
function?ReadVideoIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?ReadVideoIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%讀入視頻,前三個(gè)是第一次申明,第四個(gè)是引用
global?InputVideo;
global?ResultVideo;
global?VideoFullPath;
global?isVideo;
[ReadVideoFileName,ReadVideoPathName,ReadVideoFilterIndex]?=?uigetfile({'*.avi;*.mp4','VideoFile(*.avi,*.mp4)';'*.avi','AVIVideoFile(*.avi)';'*.*','AllFile(*.*)'},'ReadVideo',...
'MultiSelect','on',...???????%是否能夠多選,'off'不支持多選,?'on'支持多選
'C:\Users\hsw\Desktop');?%設(shè)置默認(rèn)路徑
if?isequal(ReadVideoFileName,0)?||?isequal(ReadVideoPathName,0)?||?isequal(ReadVideoFilterIndex,0)
msgbox('導(dǎo)入視頻失敗,點(diǎn)擊?確定?關(guān)閉對(duì)話框,再重新導(dǎo)入');
else
%支持多選時(shí)需要處理
isVideo?=?1;
if?iscell(ReadVideoFileName)
%讀入多個(gè)視頻時(shí)
InputVideo?=?cell(length(ReadVideoFileName),1);
VideoFullPath?=?InputVideo;
for?IterVideo?=?1:length(ReadVideoFileName)
VideoFullPath{IterVideo}?=?fullfile(ReadVideoPathName,ReadVideoFileName{IterVideo});?%先保存所有視頻或圖像路徑
end
VideoObject?=?VideoReader(VideoFullPath{1});
else
%只讀入一個(gè)視頻時(shí)
VideoFullPath?=?fullfile(ReadVideoPathName,ReadVideoFileName);
VideoObject?=?VideoReader(VideoFullPath);
end
%?????顯示第一個(gè)視頻的第一幀,直到按下Start按鈕時(shí),開(kāi)始顯示別的
frame?=?read(VideoObject,1);
axes(handles.OriginalAxes);
imshow(frame);
axes(handles.ResultAxes);
imshow(255*ones(size(frame)));
ResultVideo?=?InputVideo;
msgbox('成功導(dǎo)入視頻,點(diǎn)擊?確定?關(guān)掉對(duì)話框');
end
%?--------------------------------------------------------------------
function?SaveVideoIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?SaveVideoIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%保存視頻
[SaveVideoFileName,SaveVideoPathName,SaveVideoFilterIndex]?=?uiputfile({'*.avi;*.mp4','VideoFile(*.avi,*.mp4)';...
'*.avi','AVIVideoFile(*.avi)';'*.*','AllFile(*.*)'},'ReadVideo',...
'C:\Users\hsw\Desktop');?%設(shè)置默認(rèn)路徑
if?isequal(SaveVideoFileName,0)?||?isequal(SaveVideoPathName,0)?||?isequal(SaveVideoFilterIndex,0)
disp('User?seleceted?Cancel');
else
%這里保存所有讀入的視頻的處理結(jié)果
end
%?--------------------------------------------------------------------
function?ReadImageIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?ReadImageIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%讀入圖像,前三個(gè)是第一次申明,第四個(gè)是引用
global?InputImage;
global?ResultImage;
global?ImageFullPath;
global?isImage;
[ReadImageFileName,ReadImagePathName,ReadImageFilterIndex]?=?uigetfile({'*.jpg;*.png;*.tif','ImageFile(*.jpg;*.png;*.tif)';...
'*.jpg','JPEGImageFile(*.jpg)';'*.*','AllFile(*.*)'},'ReadImage',...
'MultiSelect','on',...???????%是否能夠多選,'off'不支持多選,?'on'支持多選
'C:\Users\hsw\Desktop');?%設(shè)置默認(rèn)路徑
if?isequal(ReadImageFileName,0)||?isequal(ReadImagePathName,0)?||?isequal(ReadImageFilterIndex,0)
msgbox('導(dǎo)入圖像失敗,點(diǎn)擊?確定?關(guān)閉對(duì)話框,再重新導(dǎo)入');
else
%?支持多選時(shí),注意需要分別處理
isImage?=?1;
if?iscell(ReadImageFileName)
%讀入多個(gè)圖像時(shí),名稱為cell數(shù)組,多個(gè)圖像必須在同一個(gè)目錄
InputImage?=?cell(length(ReadImageFileName),1);
ImageFullPath?=?InputImage;
for?IterImage?=?1:length(ReadImageFileName)
ImageFullPath{IterImage}?=?fullfile(ReadImagePathName,ReadImageFileName{IterImage});
end
FirstImageFullPath?=?ImageFullPath{1};
else
%只讀入一個(gè)視頻時(shí)
FirstImageFullPath?=?fullfile(ReadImagePathName,ReadImageFileName);
ImageFullPath?=?FirstImageFullPath;
end
%顯示第一張圖片
axes(handles.OriginalAxes);
imshow(imread(FirstImageFullPath));
axes(handles.ResultAxes);
imshow(255*ones(size(imread(FirstImageFullPath))));
ResultImage?=?InputImage;
msgbox('成功導(dǎo)入圖像,點(diǎn)擊?確定?關(guān)掉對(duì)話框');
end
%?--------------------------------------------------------------------
function?SaveImageIO_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?SaveImageIO?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%保存圖像:保存當(dāng)前結(jié)果
[SaveImageFileName,SaveImagePathName,SaveImageFilterIndex]?=?uiputfile({'*.jpg;*.png;*.tif','ImageFile(*.jpg;*.png;*.tif)';...
'*.jpg','JPEGImageFile(*.jpg)';'*.*','AllFile(*.*)'},'SaveImage','C:\Users\heshiwen\Desktop');
if?isequal(SaveImageFileName,0)?||?isequal(SaveImagePathName,0)?||?isequal(SaveImageFilterIndex,0)
disp('User?selected?Cancel');
else
%保存處理的結(jié)果
end
%?---?Executes?on?button?press?in?StartPushButton.
function?StartPushButton_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?StartPushButton?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%開(kāi)始執(zhí)行功能
%需要再次申明全局變量
global?InputVideo;
global?ResultVideo;
global?VideoFullPath;
global?isVideo;
global?InputImage;
global?ResultImage;
global?ImageFullPath;
global?isImage;
global?Count;
%?handles?不清楚有哪些按鈕可以輸出handles查看
handles
MaxNum?=??str2double(get(handles.edit1,'String'));?%練習(xí)獲取可編輯文本框中的值
disp(num2str(MaxNum));
ChooseFunctions1?=?get(handles.radiobutton1,'Value');?%執(zhí)行radiobutton對(duì)應(yīng)功能
ChooseFunctions2?=?get(handles.radiobutton2,'Value');?%執(zhí)行radiobutton對(duì)應(yīng)功能
if?isImage?%處理圖像
if?ChooseFunctions1?%進(jìn)行圖像翻轉(zhuǎn)
if?iscell(ImageFullPath)?&&?Count?
InputImage?=?imread(ImageFullPath{Count?+?1});
ResultImage{Count?+?1}?=?255*ones(size(InputImage))?-?double(InputImage);
axes(handles.OriginalAxes);
imshow(InputImage);
axes(handles.ResultAxes);
imshow(ResultImage{Count?+?1}/255,[]);
Count?=?Count?+?1;
set(handles.edit2,'String',length(ImageFullPath)?-?Count);??%設(shè)置可編輯對(duì)話框中的值
%?????????????set(handles.edit2,'String',[1,2;3,4]);
if?Count?==?length(ImageFullPath)
msgbox('圖像處理完!');
Count?=?0;
end
elseif?~iscell(ImageFullPath)?&&?Count?
InputImage?=?imread(ImageFullPath);
ResultImage?=?255*ones(size(InputImage))?-?double(InputImage);
axes(handles.OriginalAxes);
imshow(InputImage);
axes(handles.ResultAxes);
imshow(ResultImage/255,[]);
Count?=?Count?+?1;
set(handles.edit2,'String',0);
if?Count?==?1
msgbox('圖像處理完!');
Count?=?0;
end
end
elseif?ChooseFunctions2?%進(jìn)行直方圖均衡化
msgbox('沒(méi)有實(shí)現(xiàn)!');
else
errordlg('程序出錯(cuò)了!');
end
elseif?isVideo
if?ChooseFunctions1
if?iscell(VideoFullPath)?&&?Count?
VideoObject?=?VideoReader(VideoFullPath{Count?+?1});
for?IterVideo?=?1:VideoObject.NumberOfFrames
InputFrame?=?read(VideoObject,IterVideo);
ResultFrame?=?255*ones(size(InputFrame))?-?double(InputFrame);
axes(handles.OriginalAxes);
imshow(InputFrame);
axes(handles.ResultAxes);
imshow(ResultFrame/255,[]);
end
Count?=?Count?+?1;?%改如何保存呢?
elseif?~iscell(ImageFullPath)?&&?Count?
Count?=?Count?+?1;
end
elseif?ChooseFunction2
msgbox('沒(méi)有實(shí)現(xiàn)!');
else
errordlg('程序出錯(cuò)了!');
end
else
errordlg('需要先導(dǎo)入圖像/視頻');
end
%?---?Executes?on?button?press?in?ExitPushButton.
function?ExitPushButton_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?ExitPushButton?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%退出導(dǎo)航
close(gcf);
%?msgbox('Exit?!!');
function?edit1_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?edit1?(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?edit1?as?text
%????????str2double(get(hObject,'String'))?returns?contents?of?edit1?as?a?double
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?edit1_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?edit1?(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
function?edit2_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?edit2?(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?edit2?as?text
%????????str2double(get(hObject,'String'))?returns?contents?of?edit2?as?a?double
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?edit2_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?edit2?(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?slider?movement.
function?slider2_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?slider2?(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,'Value')?returns?position?of?slider
%????????get(hObject,'Min')?and?get(hObject,'Max')?to?determine?range?of?slider
ValueOfSlider?=?get(hObject,'Value');?%獲取值
set(handles.edit3,'String',ValueOfSlider);
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?slider2_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?slider2?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????empty?-?handles?not?created?until?after?all?CreateFcns?called
%?Hint:?slider?controls?usually?have?a?light?gray?background.
if?isequal(get(hObject,'BackgroundColor'),?get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9?.9?.9]);
end
function?edit3_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?edit3?(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?edit3?as?text
%?%string就是我們先要獲得或顯示的部分
%????????str2double(get(hObject,'String'))?returns?contents?of?edit3?as?a?double
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?edit3_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?edit3?(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?popupmenu1.
function?popupmenu1_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?popupmenu1?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?Hints:?contents?=?cellstr(get(hObject,'String'))?returns?popupmenu1?contents?as?cell?array
%????????contents{get(hObject,'Value')}?returns?selected?item?from?popupmenu1
contents?=?cellstr(get(hObject,'String'));?%彈出式列表中每一行的”文字“
msgbox(['你選擇的條目為?=?',contents{1}]);
popupmenuvalue?=?get(hObject,'Value');?%選擇時(shí)對(duì)應(yīng)的行
msgbox(num2str(popupmenuvalue));
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?popupmenu1_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?popupmenu1?(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?selection?change?in?listbox1.
function?listbox1_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?listbox1?(see?GCBO)
%?eventdata??reserved?-?to?be?defined?in?a?future?version?of?MATLAB
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?Hints:?contents?=?cellstr(get(hObject,'String'))?returns?listbox1?contents?as?cell?array
%????????contents{get(hObject,'Value')}?returns?selected?item?from?listbox1
contents?=?cellstr(get(hObject,'String'));
contents
contentsvalue?=?get(hObject,'Value');
msgbox(num2str(contentsvalue));
%?---?Executes?during?object?creation,?after?setting?all?properties.
function?listbox1_CreateFcn(hObject,?eventdata,?handles)
%?hObject????handle?to?listbox1?(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?togglebutton1.
function?togglebutton1_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?togglebutton1?(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?togglebutton1
%?可以實(shí)現(xiàn):開(kāi)始--結(jié)束--開(kāi)始...
togglevalue?=?get(hObject,'Value');
if?togglevalue?==?0
msgbox('togglevalue?=??1');
set(hObject,'String','播放');
elseif?togglevalue?==?1
msgbox('togglevalue?=??0');
set(hObject,'String','停止');
else
errordlg('togglebutton控件設(shè)置錯(cuò)誤');
end
%復(fù)選框
%?---?Executes?on?button?press?in?checkbox2.
function?checkbox2_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?checkbox2?(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?checkbox2
%?---?Executes?on?button?press?in?checkbox3.
function?checkbox3_Callback(hObject,?eventdata,?handles)
%?hObject????handle?to?checkbox3?(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?checkbox3
%?---?Executes?when?entered?data?in?editable?cell(s)?in?uitable1.
function?uitable1_CellEditCallback(hObject,?eventdata,?handles)
%?hObject????handle?to?uitable1?(see?GCBO)
%?eventdata??structure?with?the?following?fields?(see?UITABLE)
%???Indices:?row?and?column?indices?of?the?cell(s)?edited
%???PreviousData:?previous?data?for?the?cell(s)?edited
%???EditData:?string(s)?entered?by?the?user
%???NewData:?EditData?or?its?converted?form?set?on?the?Data?property.?Empty?if?Data?was?not?changed
%???Error:?error?string?when?failed?to?convert?EditData?to?appropriate?value?for?Data
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
%?---?Executes?when?selected?cell(s)?is?changed?in?uitable1.
function?uitable1_CellSelectionCallback(hObject,?eventdata,?handles)
%?hObject????handle?to?uitable1?(see?GCBO)
%?eventdata??structure?with?the?following?fields?(see?UITABLE)
%???Indices:?row?and?column?indices?of?the?cell(s)?currently?selecteds
%?handles????structure?with?handles?and?user?data?(see?GUIDATA)
創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)總結(jié)
以上是生活随笔為你收集整理的matlab guidata两个,Matlab的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 谷歌(Google)是怎样对待离世的Go
- 下一篇: matlab som聚类算法,使用SOM