|MATLAB Application Program Interface||Search  Help Desk|
Opens a MAT-file
#include "mat.h" MATFile *matOpen(const char *filename, const char *mode);
DescriptionThis routine allows you to open MAT-files for reading and writing.
matOpenopens the named file and returns a file handle, or
NULLif the open fails. Legal values for
||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, but does not create the file if the file does not exist (equivalent to the
||Opens file for writing only; deletes previous contents, if any.
||Creates a MATLAB 4 MAT-file, rather than the default MATLAB 5 MAT-file.
eng_matsubdirectory of the
examplesdirectory for sample programs that illustrate how to use the MATLAB MAT-file routines in a C program.