User`s guide
Save a GUIDE GUI
If you select Save from the File menu or click the Save button on the
toolbar, GUIDE saves the GUI without activating it.
ExportaGUIDEGUItoaCodeFile
Saving a GUIDE GUI using File > Save or File > Save as generates a
MATLAB code file and a FIG-file. Both files must be on the search path in
ordertoruntheGUI.GUIDEalsogivesyoutheoptiontoexportaGUItoa
single code file. The code recreates the GUI layout programmatically. When
a user runs this file, it generates the GUI figure; no preexisting FIG-file is
required. If the GUIDE GUI is designated a singleton (that is, only one copy
of it can execute at the same time, which is the default behavior), then the
exported GUI also behaves as a singleton.
When the GUI contains binary data (for example, icons or
UserData),
exporting it sometimes also generates a MAT-file containing that data. When
a user runs the exported GUI, it reads the MAT-file and loads the data it
contains. The MAT-file must be on t he MATLAB search path at that time.
To export a GUI that is open in G U IDE, use the File > Export option.
A standard file saving dialog opens for you to navigate to a folder and
save the GUI as a MATLAB code file. The default name for this file is
guiname_export.m,whereguiname isthefilenameoftheGUIDEGUI.m and
.fig files. When you export, GUIDE prompts you to save the GU I if you have
notyetsaveditorhaveeditedtheGUIsinceyoulastsavedit.
7-9