The Wayback Machine - https://web.archive.org/web/20110928151339/http://www.mathworks.com:80/help/techdoc/creating_guis/f3-998349.html
Skip to Main Content Skip to Search
Product Documentation

Introduction to GUIDE

What Is GUIDE?

GUIDE, the MATLAB Graphical User Interface Development Environment, provides a set of tools for creating graphical user interfaces (GUIs). These tools greatly simplify the process of laying out and programming GUIs.

Opening GUIDE

There are several ways to open GUIDE from the MATLAB Command line.

CommandResult
guideOpens GUIDE with a choice of GUI templates
guide FIG-file nameOpens FIG-file name in GUIDE

You can also right-click a FIG-file in the Current Folder Browser and select Open in GUIDE from the context menu.

Opening a file in GUIDE from the current folder context menu

When you right-click a FIG-file in this way, the figure opens in the GUIDE Layout Editor, where you can work on it.

All tools in the tool palette have tool tips. Setting a GUIDE preference lets you display the palette in GUIDE with tool names or just their icons. See GUIDE Preferences for more information.

Getting Help in GUIDE

When you open GUIDE to create a new GUI, a gridded layout area displays. It has a menu bar and toolbar above it, a tool palette to its left, and a status bar below it, as shown below. See GUIDE Tools Summary for a full description. At any point, you can access help topics from the GUIDE Help menu, shown in the following illustration.

GUIDE help menu items

The first three options lead you to topics in the GUIDE documentation that can help you get started using GUIDE. The Example GUIs option opens a list of complete examples of GUIs built using GUIDE that you can browse, study, open in GUIDE, and run.

The bottom option, Online Video Demos, opens a list of GUIDE- and related GUI-building video tutorials on MATLAB Central. You can access MATLAB video demos, as well as the page on MATLAB Central by clicking links in the following table.

Type of VideoVideo Content
MATLAB New Feature DemosNew Graphics and GUI Building Features in Version 7.6 (9 min, 31 s)
New Graphics and GUI Building Features in Version 7.5 (2 min, 47 s)
New Creating Graphical User Interfaces features in Version 7 (4 min, 24 s)
MATLAB Central Video TutorialsArchive for the "GUI or GUIDE" Category from 2005 to present.

Most of the MATLAB Central video tutorials are informal and brief, lasting 5 min. or less. Each covers a specific topic, such as "Accessing data from one widget to another in GUIDE." See the following static screen shot of one such video. (The video does not play when you click this illustration.)

Image of Flash Video from MATLAB Central

Authors add new tutorials to the set over time. Bookmark this page and revisit it occasionally to see them.

Laying Out a GUIDE GUI

The GUIDE Layout Editor enables you to populate a GUI by clicking and dragging GUI components into the layout area. There you can resize, group and align buttons, text fields, sliders, axes, and other components you add. Other tools accessible from the Layout Editor enable you to:

The following topic, Lay Out the Simple GUI in GUIDE, uses some of these tools to show you the basics of laying out a GUI. GUIDE Tools Summary describes the tools.

Programming a GUIDE GUI

When you save your GUI layout, GUIDE automatically generates a file of MATLAB code for controlling the way the GUI works. This file contains code to initialize the GUI and organizes the GUI callbacks. Callbacks are functions that execute in response to user-generated events, such as a mouse click. Using the MATLAB editor, you can add code to the callbacks to perform the functions you want. You can also add new functions for callbacks to use. Program the Simple GUIDE GUI shows you what statements to add to the example code to make the GUI work.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A; sessions led by MATLAB experts.

 © 1984-2011- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS