Why does saving the variables in a MAT file produce extremely large files in MATLAB 7.5 (R2007b)?

6 views (last 30 days)
When I save my workspace variables in a version 7.3 MAT-file in MATLAB 7.5 (R2007b), using a command such as
save foo.mat
the size of the file is much larger compared to if I save the file as:
save –v6 foo.mat
or
save –v7 foo.mat

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Jan 2010
This occurs because one of the new options in MATLAB 7.5 (R2007b) is saving a MAT-file based on the HDF5 data format. The HDF5 data format is richer and is not compressed in MATLAB R2007b. The resulting files are thus much larger. The size is particularly larger when the user is trying to save cells or structures.
This issue can be resolved by changing your default save option from File menu -> Preferences -> General -> MAT files to either "MATLAB Version 7 or later" or "MATLAB Version 5 or later".
With MATLAB R2008a, the SAVE command now compresses these MAT-files.

More Answers (0)

Products


Release

R2007b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!