MATLAB Application Program Interface Reference Help Desk

matOpen

Purpose

Opens a MAT-file

Fortran Syntax

Arguments

filename

Name of file to open.

mfp

Pointer to MAT-file information.

mode

File opening mode.

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. Legal values for mode are

r   Opens file for reading only; determines the current version of the MAT-file by inspecting the files and preserves the current version.
uOpens file for update, both reading and writing; determines the current version of the MAT-file by inspecting the files and preserves the current version.
wOpens file for writing only; deletes previous contents, if any.
w4Creates a MATLAB 4 MAT-file, rather than the default MATLAB 5 MAT-file.

Example

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.

Note: Fortran MAT-file routines are not available on Windows.



[ Previous | Help Desk | Next ]