
Running a GUI
7-11
If a GUI accepts arguments when it is run, they are passed to the GUI’s
opening function. See “Opening Function” on page 8-15 for more information.
Note Consider whether you want to allow more than one copy of the GUI to
be active at the same time. If you want only one GUI to be active, select
Options from the Layout Editor View menu, then select GUI Allows Only
One Instance to Run (Singleton)
. See “GUI Options” on page 5-9 for more
information.
From an M-file Script
Run your GUI from an M-file script by executing the GUI M-file. For example,
if your GUI M-file is
mygui.m, include the following statement in your M-file
script.
mygui
The M-file must reside on the MATLAB path or in the current MATLAB
directory where the GUI is run.
If a GUI accepts arguments when it is run, they are passed to the GUI’s
opening function. See “Opening Function” on page 8-15 for more information.
Note Consider whether you want to allow more than one copy of the GUI to
be active at the same time. If you want only one GUI to be active, select
Options from the Layout Editor View menu, then select GUI Allows Only
One Instance to Run (Singleton)
. See “GUI Options” on page 5-9 for more
information.
Commentaires sur ces manuels