Even if your Fortran file seems to run fine usually, the created MAT file is obviously corrupted. This can have different reasons:
- The Fortran code has a bug.
- The Fortran code follows specifications of the MAT format, which do not equal the implementation on MATLAB. Ambiguous format definition would not be a real surprise, when I think of e.g. the binary DOC format of MS Word...
- The harddisk is damaged.
I guess without any argument, that your problem is caused by point 1.
