Skip to Main Content Skip to Search
Product Documentation

uisave - Interactively save workspace variables to MAT-file

Syntax

uisave
uisave(variables)
uisave(variables,filename)

Description

uisave, with no arguments, prompts you for a file name, and then saves all variables from your workspace to that file.

uisave(variables) saves one or more workspace variables listed in variables.

uisave(variables,filename) uses the specified filename as the default File name in the Save Workspace Variables dialog box, instead of the default matlab.mat.

Tips

Input Arguments

variable

String containing the name of a variable in the current workspace or cell array of strings when specifying more than one variable.

Default: All variables in the current workspace are saved to a MAT-file.

filename

String naming a file to appear in the dialog File name field when the dialog opens. You can omit a file extension, or specify the file extension as .mat.

Default: matlab.mat

Definitions

Modal Dialog

A modal dialog box prevents the user from interacting with other windows before responding. For more information, see WindowStyle in the MATLAB Figure Properties.

Examples

Create workspace variables h and g, and then display the Save Workspace Variables dialog box in the current folder with the default File name set to var1.

h = 365;
g = 52;
uisave({'h','g'},'var1');

Clicking Save stores the workspace variables h and g in the file var1.mat in the displayed folder.

Alternatives

Use any of the following GUI options to save workspace variables:

See Also

save | uigetfile | uiopen | uiputfile

Tutorials

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS