Skip to content

save

builtin · libnexusinterp/corefcn/load-save-proprietary.cc

: save file
: save file var1 …
: save (option, …, file, var1, …)
: save -struct file structname field1 …

Save variables to a file.

Without variable names every variable of the workspace is saved; names may contain wildcards, and -regexp treats them as regular expressions. With -struct the fields of the named scalar structure are saved as individual variables.

Without a format option a MAT-file is written (the extension .mat is added to a name without extension). Other formats are selected with -text, -binary, -float-binary, -hdf5, -ascii (with -double and -tabs), -v4, -v6, -v7 (also -mat) and -v7.3. -z compresses the file with gzip and -append adds variables to an existing file. The file name - writes to the console.