matlab handles结构体是怎么回事
发布网友
发布时间:2022-05-10 01:00
我来回答
共1个回答
热心网友
时间:2023-10-15 22:29
我简单修改了一下,你看下吧
% --- 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);