I'm using R2018b running on a linux (CentOS 7) machine.
I have a structure X that is about 400MB in size inside matlab (according to the size listed in "Workspace"). If I save that variable to a .mat file, e.g.:
> save('MyStructure.mat','X')
The resulting .mat file is about 1.3Gb in size, or 3X larger than the size of the variable it is saving. Looking at my preferences, the default save format is V7.3.
However, if I save the same variable using the V7 format
> save('MyStructure.V7.mat','X','-v7')
The resulting .mat file is now only about 12MB, indicating compressed the data by about 30X when saving the file.
Best I can tell from reading documentation and help forums, both V7 and V7.3 save files using compression. However, why would I be getting a file size expansion of 3X when using the V7.3 format?
2 Comments
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/444179-save-function-significantly-larger-than-variables-in-the-file#comment_669703
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/444179-save-function-significantly-larger-than-variables-in-the-file#comment_669703
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/444179-save-function-significantly-larger-than-variables-in-the-file#comment_669723
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/444179-save-function-significantly-larger-than-variables-in-the-file#comment_669723
Sign in to comment.