在matlab的命令窗口中输入guide,确认后进到guide开发环境下:
设计GUI:
M-file文件:
function varargout = t2(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @t2_OpeningFcn, ...
'gui_OutputFcn', @t2_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
function t2_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObje