Franck Dernoncourt
Franck Dernoncourt

Reputation: 83417

What default mat format version does save use?

In Matlab, when using the save function, what determines the default mat format version (-v4, -v6, -v7, -v7.3) that is used?

Upvotes: 4

Views: 378

Answers (1)

Autonomous
Autonomous

Reputation: 9075

To find the default version for save, go to MATLAB preferences -> General -> MAT files. I have set it to MATLAB version 7.3 or later. If you want to see how to change it, see here.

I will just give a short example here for the sake of completeness:

a=randn(100,10);
save('saved_a.mat','-v7.3')  %or '-v7, -v6' for example

EDIT: I am not sure what is the default MAT-file format for each MATLAB version, since in my R2013b, I had version 7 as the default version. It should have been version 7.3.

However, you can see that since R2006b, version 7.3 was available. Version 7 came out with MATLAB 7 (or R14). Version 6 came out with MATLAB 5. The original version is version 4. You can also find detailed information about MAT-file header etc. in this document.

Upvotes: 3

Related Questions