A Guide to MATLAB for Beginners and Experienced Users, Second Edition

With MATLAB you can create your own Graphical User Interface, or GUI, which consists of a Figure window containing menus, buttons, text, graphics, etc., that a user can manipulate interactively with the mouse and keyboard. There are two main steps in creating a GUI: one is designing its layout, and the other is writing callback functions that perform the desired operations when the user selects different features.
Specifying the location and properties of various objects in a GUI can be done with commands such as uicontrol, uimenu, and uicontextmenu in an M-file. MATLAB also provides an interactive tool (a GUI itself!) called GUIDE (this stands for Graphical User Interface Development Environment) that greatly simplifies the task of building a GUI. We will describe here how to get started writing GUIs with the MATLAB 7 version of GUIDE, which has some significant enhancements over earlier versions. The version of GUIDE in MATLAB 6 is roughly similar, but some of the menu items and options are different or missing.
| Tip | One possible drawback of GUIDE is that it equips your GUI with commands that are new in MATLAB 7 and it saves the layout of the GUI in a binary .fig file. If your goal is to create a robust GUI that many different users can use with different versions of MATLAB, you may be better off writing the GUI from scratch as an M-file. |
To open GUIDE, select File: New