MATLAB Creating Graphical User Interfaces
Note: Before you can call lbox2 in the Command Window, you must save the GUIDE files in a folder on your MATLAB® path. To save t ...
else errordlg('Input must be a valid directory','Input Argument Error!') return end else errordlg('Unrecognized input argument', ...
open(filename) catch ex errordlg(... ex.getReport('basic'),'File Type Error','modal') end end end See Also Related Examples “Cr ...
Plot Workspace Variables in a GUIDE App In this section... “Open and Run the App” on page 8-20 “Examine the Code” on page 8-21 T ...
Examine the Code (^1) In GUIDE, click the Editor button to view the code. 2 Near the top of the Editor window, use the Go To but ...
plot_button_Callback The plot_button_Callback function executes when the user presses the Plot button. The callbacks for the Sem ...
Automatically Refresh Plot in a GUIDE App This example shows how to examine and run a prebuilt GUIDE app. The app displays a sur ...
Examine the Code (^1) In GUIDE, click the Editor button to view the code. 2 Near the top of the Editor window, use the Go To but ...
ex_guide_timergui_OpeningFcn The ex_guide_timergui_OpeningFcn function executes when the app opens and starts running. This comm ...
startbtn_Callback The startbtn_Callback function calls the start method of the timer object if the timer is not already running. ...
Create UIs Programmatically “Lay Out a UI Programmatically” on page 9-25 “Create Menus for Programmatic Apps” on page 9-38 “Cre ...
...
Lay Out a Programmatic UI “Structure of Programmatic App Code Files” on page 9-2 “Add Components to a Programmatic App” on page ...
Structure of Programmatic App Code Files In this section... “File Organization” on page 9-2 “File Template” on page 9-2 “Run the ...
% Construct the components % Initialization tasks % Callbacks for MYUI % Utility functions for MYUI end Save the file in your cu ...
Add Components to a Programmatic App User interface controls are common UI components, such as buttons, check boxes, and sliders ...
'String','Button 1' add the label, Button 1 to the push button. 'Position',[50 20 60 40] specifies the location and size of the ...
'Value',1 selects the radio button by default. Set the Value property to be the value of the Max property to select the radio bu ...
'Position',[30 20 100 30] specifies the location and size of the toggle button. In this example, the toggle button is 100 pixels ...
check box, MATLAB sets Value to Max when the user checks the box and to Min when the user unchecks it. The Position property spe ...
«
8
9
10
11
12
13
14
15
16
17
»
Free download pdf