This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

MATLAB Fortran API to Read MAT-File Data

Read and write MATLAB® data from Fortran programs

Before writing a custom application, determine if MATLAB meets your data exchange needs by reviewing the following topics.

Fortran MAT-File API

matOpenOpen MAT-file
matCloseClose MAT-file
MATFileType for MAT-file
matGetVariableArray from MAT-file
matGetVariableInfoArray header information only
matGetNextVariableNext array in MAT-file
matGetNextVariableInfoArray header information only
matPutVariableArray to MAT-file
matPutVariableAsGlobalArray to MAT-file as originating from global workspace
matDeleteVariableDelete array from MAT-file
matGetDirList of variables in MAT-file
mxIsFromGlobalWSDetermine whether array was copied from MATLAB global workspace


Create MAT-File in Fortran

The matdemo1.F example creates the MAT-file, matdemo.mat.

Read MAT-File in Fortran

The matdemo2.F example illustrates how to use the library routines to read the MAT-file created by matdemo1.F and describe its contents.