matlab handles结构体是怎么回事

如题所述

第1个回答  2016-07-14
我简单修改了一下,你看下吧
% --- Executes just before untitled is made visible.
function untitled_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 untitled (see VARARGIN)

% Choose default command line output for untitled
handles.output = hObject;
h=uicontrol(...
'Style','pushbutton',...
'Tag','push',...
'Units','Normalized',...
'Position',[0.1 0.1 0.2 0.2],...
'Callback',{@push_Callback,handles})
get(h)
handles.push=h;
% Update handles structure
guidata(hObject, handles);本回答被提问者采纳