MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Instrukcja Użytkownika Strona 168

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 330
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 167
7 Saving and Running the GUI
7-10
Running a GUI
Generally, you run your GUI by executing the M-file that GUIDE generates.
This M-file contains the commands to load the GUI and provides a framework
for the component callbacks. See “GUI Files: An Overview” on page 8-5 for
more information about the M-file.
When you execute the M-file, a fully functional copy of the GUI displays on the
screen. You can run a GUI:
“From the GUIDE Layout Editor” on page 7-10
“From the Command Line” on page 7-10
“From an M-file Script” on page 7-11
Note You can display an inactive copy of the GUI figure using the openfig,
open, or hgload command. These commands load FIG-files into the MATLAB
workspace. Note that the displayed GUI is not active.
From the GUIDE Layout Editor
Run your GUI from the GUIDE layout Editor by:
Clicking the Run icon on the Layout Editor toolbar
Selecting
Run from the Tools menu
In either case, GUIDE saves the GUI files before activating the GUI and opens
the GUI M-file in your default editor. See “Saving a GUI” on page 7-5 for
information about this process. See “GUI Files: An Overview” on page 8-5 for
more information about M-files.
From the Command Line
Run your GUI from the command line by entering the name of its M-file. For
example, if your GUI M-file is
mygui.m, type
mygui
at the command line. If the M-file does not reside on your MATLAB path or in
your current MATLAB directory, you must also specify the path.
Przeglądanie stron 167
1 2 ... 163 164 165 166 167 168 169 170 171 172 173 ... 329 330

Komentarze do niniejszej Instrukcji

Brak uwag