External Interfaces Reference Previous page   Next Page
matOpen

Open MAT-file

Fortran Syntax

Arguments

filename
   Name of file to open.

mode
   File opening mode. Legal values for mode are:

Table 1-1:
r
Open file for reading only. Determines the current version of the MAT-file by inspecting the files and preserves the current version.
u
Open file for update, both reading and writing, but does not create the file if the file does not exist (equivalent to the r+ mode of fopen). Determines the current version of the MAT-file by inspecting the files and preserves the current version.
w
Open file for writing only. Deletes previous contents, if any.
w4
Create a Level 4 MAT-file, compatible with MATLAB Versions 4 and earlier.
wL
Open file for writing character data using the default character set for your system. The resulting MAT-file can be read with MATLAB version 6 or 6.5.
If you do not use the wL mode switch, MATLAB writes character data to the MAT-file using Unicode encoding by default.
wz
Open file for writing compressed data.

mfp
   Pointer to MAT-file information.

Description

This routine allows you to open MAT-files for reading and writing.

matOpen opens the named file and returns a file handle, or 0 if the open fails.

Examples

See matdemo1.f and matdemo2.f in the eng_mat subdirectory of the examples directory for sample programs that illustrate how to use the MATLAB MAT-file routines in a Fortran program.


Previous page  matGetVariableInfo matPutArray (Obsolete) Next page

© 1994-2005 The MathWorks, Inc.