Name of file to open
File opening mode. The following table lists valid values for mode.
Opens file for reading only; determines the current version of the MAT-file by inspecting the files and preserves the current version.
Opens file for update, both reading and writing. If the file does not exist, does not create a file (equivalent to the r+ mode of fopen). Determines the current version of the MAT-file by inspecting the files and preserves the current version.
Opens file for writing only; deletes previous contents, if any.
Creates a MAT-file compatible with MATLAB® Versions 4 software and earlier.
Opens file for writing character data using the default character set for your system. Use MATLAB Version 6 or 6.5 software to read the resulting MAT-file.
If you do not use the wL mode switch, MATLAB writes character data to the MAT-file using Unicode® character encoding by default.
Opens file for writing compressed data. By default, the MATLAB save function compresses workspace variables as they are saved to a MAT-file. To use the same compression ratio when creating a MAT-file with the matOpen function, use the wz option.
Creates a MAT-file in an HDF5-based format that can store objects that occupy more than 2 GB.
See the following examples in matlabroot/extern/examples/eng_mat.