


See Remarks, below.Ī format that MATLAB Version 6 and earlier can openīy default, MATLAB compresses the data it saves to MAT-files. The specified existing MAT-file, appended to the end. Saves those variables that match any of the regular expressions expr1, expr2, etc.Įnables you to make use of other data formats available with the save function. Saves as individual variables only those structure fields specified ( s.f1, s.f2. Saves all fields of the scalar structure s as individual variables within the file filename. For example, save('A*') saves all variables that start with A. Use the * wildcard to save only those variables that match the specified pattern. Saves only the specified workspace variables in filename.mat. If filename is the special string stdio, the save command sends the data as standard output. To save to another directory, use the full pathname for the filename. Stores all workspace variables in the current directory in filename.mat. They can also be manipulated by other programs external to MATLAB. They can be created on one machine and later read by MATLAB on another machine with a different floating-point format, retaining as much accuracy and range as the different formats allow.

MAT-files are double-precision, binary, MATLAB format files. )īy itself stores all workspace variables in a binary format in the current directory in a file named matlab.mat. Save (MATLAB Functions) MATLAB Function ReferenceĪs an alternative to the save function, select Save Workspace As from the File menu in the MATLAB desktop, or use the Workspace browser.
