Specifications

Using the Layout Editor
3-21
Note GUIDE automatically saves both the M-file and the FIG-file when you
run the GUI.
Saving the Layout
Once you have created the GUI layout, you can save it as a FIG-file (a binary
file that saves the contents of a figure) using the
Save or Save As item from the
File menu. GUIDE generates the M-file automatically when you save or run
the figure.
Renaming GUI Files
Use Save As from the Layout Editor File menu to rename the GUI FIG-file.
GUIDE renames the FIG-file and the GUI M-file and also resets the callback
properties to properly execute the callbacks.
Exporting a GUI to a Single M-File
You can export a GUI from GUIDE to a single M-file that does not require a
FIG-file. This enables you to
View the layout code for the GUI
Run the GUI in MATLAB 6.1
Note If the GUI contains a panel or a button group, you will not be able to
run it in MATLAB versions earlier than 7.0.
To export your GUI, do the following steps:
1 Save the GUI in GUIDE, if you have not already done so.
2 Select Export from the File menu. If you changed the GUI since you last
saved it, this opens a dialog informing you that exporting will save changes
to your figure and M-file, and asking if you want to continue.
3 Click OK in the confirmation dialog.