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.