MATLAB: Is it possible to open a compressed MAT file using matOpen in C

apimatMATLABmatopen

Best Answer

'matOpen' and the rest of the MAT API are capable of reading a MAT file stored with the compression provided by the MAT library (E.g. save -v7.3).
In the MATLAB code be sure to include the below line:
>> save filename.mat -v7.3;
In C code you can use the below lines:
#include "mat.h"
MATFile *matOpen(const char *filename, const char *mode);