After you modify a file in the Editor, an asterisk (*) follows the file name. This asterisk
indicates that there are unsaved changes to the file.
You can perform four different types of save operations, which have various effects, as
described in this table.
Save Option Steps
Save file to disk and keep file open in the
Editor.
On the Editor or Live Editor tab, in the File
section, click.
Rename file, save it to disk, and make it
the active Editor document. Original file
remains unchanged on disk.
(^1) On the Editor or Live Editor tab, in the
File section, click Save and select Save
As.
(^2) Specify a new name, type, or both for the
file, and then click Save.
Save file to disk under new name.
Original file remains open and unsaved.
(^1) On the Editor tab, in the File section,
click Save and select Save Copy As.
MATLAB opens the Select File for Backup
dialog box.
(^2) Specify a name and type for the backup
file, and then click Save.
Save changes to all open files using
current file names.
All files remain open.
On the Editor tab, in the File section, click
Save and select Save All.
Some options for saving files are not available in MATLAB Online.
Recommendations on Saving Files
MathWorks recommends that you save files you create and files from MathWorks that you
edit to a folder that is not in the matlabroot folder tree, where matlabroot is the
folder returned when you type matlabroot in the Command Window. If you keep your
files in matlabroot folders, they can be overwritten when you install a new version of
MATLAB software.
At the beginning of each MATLAB session, MATLAB loads and caches in memory the
locations of files in the matlabroot folder tree. Therefore, if you:
24 Coding and Productivity Tips