User`s guide
2 How to Create a GUI with GUIDE
1 Display the Surf push button callback in the MATLAB Editor. Right-click
the Surf push button in the Layout Editor to display a context menu. From
that menu, select View Callbacks > Callback.
In the editor, the cur sor moves to the Surf push button callback in the GUI
code file, which already contains this code:
% --- E
xecutes on button press in pushbutton1.
funct
ion pushbutton1_Callba ck(hObject, eventdata, handles)
% hObj
ect handle to pushbutton1 (see GCBO)
% eve
ntdata reserved - to be defined in a future version of MATLAB
% han
dles structure with handles and user data (see GUIDATA)
2 Add the following code to the callback immediately after the comment that
begins
% handles...
%Di
splay surf plot of the current ly selected data.
sur
f(handles.current_data);
2-34