uisave - Open standard dialog box for saving workspace variables

Syntax

uisave
uisave(variables)
uisave(variables,filename)

Description

uisave displays the Save Workspace Variables dialog box for saving workspace variables to a MAT-file, as shown in the figure below. By default, the dialog box opens in your current directory.

If you type a name in the File name field, such as my_vars, and click Save, the dialog saves all workspace variables in the file my_vars.mat. The default filename is matlab.mat.

uisave(variables) saves only the variables listed in variables. For a single variable, variables can be a string. For more than one variable, variables must be a cell array of strings.

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

Example

This example creates workspace variables h and g, and then displays the Save Workspace Variables dialog box in the current directory 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 directory.

See Also

uigetfile, uiputfile, uiopen

  


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