Problems with saving large workspace

7 views (last 30 days)
Christian
Christian on 4 Mar 2019
Answered: Walter Roberson on 4 Mar 2019
Sometimes when I have a quite large workspace - e.g. a table with 8.5 million rows and 27 columns, Matlab has problems saving it.
A very small file appears but the program does not succeed in saving the workspace - no warning or anything.
Yesterday I just waited, and hours later I got a strange error message saying the file did not exist.
This is severely annoying, because I have to regenerate data that takes to to generate a lot of times.
I'm running Matlab R2018b, but I think this has been happening for a couple of versions back.
Suggestions?
Edit: So trying again I noticed something really weird happens.
It starts saving, and I can see the size of the file to which I try to save grow... then at some point I hear a chime sound from Windows, and the file size goes back to zero and then starts growing again.
Edit2: When using the save-command I get the following error msg:
"Error using save
Error closing file R:\MATLAB data\Christian\ftard.mat.
The file may be corrupt."

Answers (2)

Fangjun Jiang
Fangjun Jiang on 4 Mar 2019
You might consider Tall Arrays
web(fullfile(docroot, 'matlab/import_export/tall-arrays.html'))

Walter Roberson
Walter Roberson on 4 Mar 2019
save with the -v7.3 option.

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!