Open MAT-file
#include "mat.h" MATFile *matOpen(const char *filename, const char *mode);
#include "mat.h" mwPointer matOpen(filename, mode) character*(*) filename, mode
filename
Name of file to open
mode
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 |
| Opens file for writing only; deletes previous contents, if any. |
| Creates a MAT-file compatible with MATLAB® Versions 4 software and earlier. |
| Creates a MAT-file compatible with MATLAB Version
5 (R8) software or earlier. Equivalent to |
| 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 Equivalent to |
| Creates a MAT-file compatible with MATLAB Version
7.0 (R14) software or earlier. Equivalent to |
| Opens file for writing compressed data. By default, the MATLAB Equivalent to |
| Creates a MAT-file in an HDF5-based format that can store objects that occupy more than 2 GB. |
File handle, or NULL
in C (0
in
Fortran) if the open fails.
This routine opens a MAT-file for reading and writing.
See these examples in
:matlabroot
/extern/examples/eng_mat