You can export a GUI (FIG-file and code file) to a single programmatic 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.
To export a GUI that is open in GUIDE, select File > Export.
If 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 the MATLAB® search path at that time.