MATLAB: Does the ‘MAT-File Header Summary’ include the ‘MATLAB 5.0 MAT-file’ header message when I try to save the data as a MAT file in ‘-v7’ version in MATLAB 7.9 (R2009b)

MATLAB

I am trying to save my data as a MAT file in '-v7' version. However, when I inspect the generated MAT file, under the 'MAT-File Header Summary' I notice that it includes the 'MATLAB 5.0 MAT-file' header message.
I also noticed that, when I tried to save the MAT file in '-v7.3' version, the header message included the version of MAT file correctly i.e. 'MATLAB 7.3 MAT-file'.

Best Answer

The format in which the MAT files are saved is officially known as "Level 5" format. However, '-v5','-v6' and '-v7' refer to different capabilities on the same format.
If we try saving with the '-v6' flag, we get a MAT file with a header reporting "MATLAB 5.0 MAT-file" as shown in the example code below.
x = 1;
save v4 -v4
save v6 -v6
save v7 -v7
save v73 -v7.3
type v4.mat
type v6.mat
type v7.mat
type v73.mat
This header message has been updated only when the structure of the file was changed. Compression and Unicode were introduced in '-v7',but using the same basic file format.
The following documentation link on MAT-File formats will also be helpful.
<http://www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf>