Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

Introduction

After laying out your GUI, program its behavior. This chapter addresses the programming of GUIs created programmatically. Specifically, it discusses data creation, GUI initialization, and the use of callbacks to control GUI behavior.

The following ordered list shows these topics within the organization of the typical GUI M-file.

  1. Comments displayed in response to the MATLAB help command.

  2. Initialization tasks such as data creation and any processing for constructing the components. See Initializing the GUI for information.

  3. Construction of figure and components. See Laying Out a GUI for information.

  4. Initialization tasks that require the components to exist, and output return. See Initializing the GUI for information.

  5. Callbacks for the components. Callbacks are the routines that execute in response to user-generated events such as mouse clicks and key strokes. See Callbacks: An Overview and Examples: Programming GUI Components for information.

  6. Utility functions.

Discussions in this chapter assume the use of nested functions. For information about using nested functions, see Nested Functions in the MATLAB Programming Fundamentals documentation.

See Function Reference in the MATLAB Function Reference documentation for a list of functions provided for GUI creation.

  


Recommended Products

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

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