Save a UI

To save a UI in GUIDE, use any of the following methods:

  • On the Layout Editor toolbar, click Save or Run .

  • On the Layout Editor menu bar, select the FileSave or Save as options

    Note:   GUIDE UIs cannot run correctly from a private folder.

Create a Backward Compatible GUIDE Fig-File

FIG-files that are created or modified with MATLAB® 7.0 or a later MATLAB version, are not automatically compatible with Version 6.5 and earlier versions.

Perform these steps to make a FIG-file backward compatible:

  1. From the Layout editor, select File > Preferences.

  2. Select MATLAB > General > MAT-Files.

  3. Select MATLAB Version 5 or later (save -v6)


    • Because button groups, panels, and tables were introduced in MATLAB 7, you should not use them in UIs that you expect to run in earlier MATLAB versions.

    • The -v6 option will be removed in a future version of MATLAB

Append New Callbacks to an Existing GUIDE Code File

If you save a GUIDE UI to an existing file, GUIDE displays a dialog box that asks you if you want to replace the existing FIG-file. If you click Yes, GUIDE displays a dialog that asks if you want to replace the existing code file or append to it. The most common choice is Replace.

If you choose Append, GUIDE adds callbacks to the existing code file for components in the current layout that are not present within it. Before you append the new components, ensure that their Tag properties do not duplicate Tag values that appear in callback function names in the existing code file.

Was this topic helpful?