Main Content


用于读取 MAT 文件数据的 MATLAB Fortran API

在 Fortran 程序中读取和写入 MATLAB® 数据

在编写自定义应用程序之前,请通过查看以下主题确定 MATLAB 是否满足您的数据交换需求。

Fortran MAT 文件 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 mxArray 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.