| MATLAB® | ![]() |
| On this page… |
|---|
This section shows you how to use GUIDE to create the graphical user interface (GUI) shown in the following figure.

The GUI contains
An axes component
A pop-up menu listing three different data sets that correspond to MATLAB® functions: peaks, membrane, and sinc
A static text component to label the pop-up menu
Three push buttons, each of which provides a different kind of plot: surface, mesh, and contour
To use the GUI, select a data set from the pop-up menu, then click one of the plot-type buttons. Clicking the button triggers the execution of a callback that plots the selected data in the axes.
Subsequent topics, starting with Laying Out a Simple GUI, guide you through the steps to create this GUI. We recommend that you create the GUI for yourself, as this is the best way to learn how to use GUIDE.
If you are reading this in the MATLAB Help browser, you can click the following links to display the GUIDE Layout Editor and the MATLAB Editor with a completed version of this example.
Note The following links execute MATLAB commands and are designed to work within the MATLAB Help browser. If you are reading this online or in PDF, you should go to the corresponding section in the MATLAB Help Browser to use the links. |
![]() | GUIDE: A Brief Introduction | Laying Out a Simple GUI | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |