
vi Contents
Generating Data to Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-19
Programming the Pop-Up Menu . . . . . . . . . . . . . . . . . . . . . . . . 2-21
Programming the Push Buttons . . . . . . . . . . . . . . . . . . . . . . . . 2-23
Running the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26
3
Creating a GUI Programmatically
The Example: Simple GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
Function Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Functions Used to Create the Simple GUI . . . . . . . . . . . . . . . . . 3-4
Other MATLAB Functions Used in the GUI . . . . . . . . . . . . . . . 3-4
Creating a GUI M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
Laying Out a Simple GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Creating the Figure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Adding the Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Initializing the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-11
Programming the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Programming the Pop-Up Menu . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Programming the Push Buttons . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Associating Callbacks with Their Components . . . . . . . . . . . . 3-15
Running the Final GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
The Final M-File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Running the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-19
Commentaires sur ces manuels