Creating Graphical User Interfaces |
GUI with Axes and Menu
The GUI with axes and menu template is shown in the following figure.
When you run the GUI by clicking the Run icon on the toolbar, the GUI displays a plot of five random numbers generated by the MATLAB rand(5)
command, as shown in the following figure.
You can select other plots in the pop-up menu. Clicking the Update button displays the currently selected plot on the axes.
The GUI also has a File menu with three items:
printdlg
command, which opens the Print dialog:
Note that handles.figure1
contains the current plot. Clicking Yes in the Print dialog prints the plot.
GUI with Uicontrols | Modal Question Dialog |
© 1994-2005 The MathWorks, Inc.