Installation guide

5 Workspace, Search Path, and File Operations
TheworkspacevariablesaresavedundertheMAT-filenameyouspecified.
Yo u can also save the workspace variables from the desktop b y selecting Save
Workspace As from the File menu.
Saving Selected Variables
To save some but not all of the current workspace v ariables,
1 SelectthevariableintheWorkspacebrowser. Toselectmultiplevariables,
Shift+click or Ctrl+click.
2 Right-click and from the contex t menu, select Save As.
The Save to MAT-File dialog box opens.
3 Specify the location and File name. MATLAB automatically supplies the
.mat extension.
4 Click Save.
TheworkspacevariablesaresavedundertheMAT-filenameyouspecified.
To specify preferences for saving MAT-files, see “MAT-Files Preferences” on
page 2-79.
Function Alternative
To save workspace variables, use the save function followed by the filename
you want to save to. For example,
save('june10')
saves a ll current workspace variables to the file june10.mat.
If you don’t specify a filename, the workspace is saved to
matlab.mat in the
current working directory. You can specify which variables to save, as well
as control the format in which the data is stored, such a s ASCII. For these
and other forms of the function, see the refere nce page for
save. For a related
function, see
genvarname. MATLAB provides additional functions for saving
5-6