Creating Graphical User Interfaces - The MathWorks - #50

/ 520


catalogue search
P. 01
P. 02
P. 03
P. 04
P. 05
P. 06
P. 07
P. 08
P. 09
P. 10
P. 11
P. 12
P. 13
P. 14
P. 15
P. 16
P. 17
P. 18
P. 19
P. 20
P. 21
P. 22
P. 23
P. 24
P. 25
P. 26
P. 27
P. 28
P. 29
P. 30
P. 31
P. 32
P. 33
P. 34
P. 35
P. 36
P. 37
P. 38
P. 39
P. 40
P. 41
P. 42
P. 43
P. 44
P. 45
P. 46
P. 47
P. 48
P. 49
P. 50


See other catalogues for The MathWorks

Text version of the page
2 Creating a Simple GUI with GUIDE
1 Display the Surf push button callback in the M-file editor. Right-click the Surf push button in the Layout Editor to display a context menu. From that menu, select View Callbacks > Callback.
The GUI M-file opens in the editor if it is not already open, and the cursor moves to the Surf push button callback, which already contains this code:
Executes on button press in pushbuttons
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
2 Add the following code to the callback immediately after the comment that begins % handles...
% Display surf plot of the currently selected data. surf(handles.current_data);
3 Repeat steps 1 and 2 to add similar code to the Mesh and Contour push button callbacks.
• Addthis codetothe Mesh push button callback, pushbutton2_Callback:
2-26

pageCatalog pdf di En 2012-06-22-01