If filename has no extension that is no period followed by text and the value of format is not specified then matlab appends mat if filename does not include a full path matlab saves to the current folder.
Save data matlab mat.
However you can save any or all the variables in the current workspace to a mat file mat you can then reuse the workspace variables later during the current matlab session or during another session by loading the saved mat file.
For example you can save data to a subset of a variable in a mat file or read a subset of a variable into the matlab workspace.
If you do not specify filename the save function saves to a file named matlab mat.
Name of file specified as a character vector or string scalar.
Once you had created the table described there you can save it to a mat file.
If you save data to a mat file that you intend to load using matlab version 6 or earlier.
By default matlab compresses the data it saves to mat files.
The workspace is not maintained across sessions of matlab when you quit matlab the workspace clears.
Save data to a subset of a variable y in the file myfile2 mat using the mat file object.
Save and load workspace variables.
Matlab also uses unicode character encoding when saving character data.
Specify the v6 option if you want to disable both of these features for a particular save operation.
Are you trying to create a text output file or a binary output file.
Data compression is optional however and you can disable it either for an individual save operation or for all of your matlab sessions.
Access specific parts of a variable in a mat file using the mat file object.