readMatfile

Reads a binary .mat file.

You are now following this Submission

This compiled function returns the content of a binary mat file in a structure, similarly to the result obtained with :

z = load ('myfile.dat', '-mat') ;

This program is intended to be a replacement of the above instruction that returns an empty structure when used in a compiled m-file.

Use : z = readMatfile (filename) ;

This program will return an error if used to read in an ASCII mat file.

Cite As

Normand Gregoire (2026). readMatfile (https://www.mathworks.com/matlabcentral/fileexchange/3187-readmatfile), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0