Variable cannot be saved to MAT-file whose version is older than 7.3
Show older comments
I have an ASCII data file (14,4 MB), which I convert into *.mat with MATLAB (with my own written function).
-The *.mat file then gets 15,8 MB and contains:
- a cell array (950000x17 cell) with a string in each cell
- a numerical array (950000x5 double).
The *.mat file has 15,8 MB. There is no problem with the use of the 'save' function.
Problem: I have another ASCII data file (22,2 MB), which I try to convert into *.mat with MATLAB and try to save these two arrays:
- a cell array 'text_data' (1400000x17) with a string in each cell
- a numerical array (1400000x5 double).
Then I get the following error message: "Warning: Variable 'text_data' cannot be saved to a MAT-file whose version is older than 7.3. To save this variable, use the -v7.3 switch. Skipping...".
When I use 'save(filename,...,-v7.3)' I get an *.mat-file of 6,48 GB!
Questions: Why does it fail to save the data content of the 22,2MB ASCII file, while it is capable to save the data content of a 14,4 MB ASCII data file. Why is the *.mat-file with -v7.3 switch that disproportionately huge!
I work with an 64-bit Computer (WIN7) and MATLAB version r2011b.
Accepted Answer
More Answers (1)
Titus Edelhofer
on 22 Nov 2012
Hi,
what does
whos text_data
tell you about the size of text_data? I suspect it's more than 2GB (e.g. 6.5GB?), that's why it fails to be save with formats older than 7.3.
The 7.3 format is uncompressed, therefore it will be much larger than the compressed 7.0 format (for the smaller file).
Titus
1 Comment
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!