How to save struct datatype to disk
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have searched around but have not gotten any useful answers. I have a structure, with each element containing a 1x1 cell and another structure. The second structure contains multiple structures each holding doubles of various lengths.
The entire structure takes up about 25 GB of RAM and I would like to save all the contents to disk. I have tried:
save('name.mat' ,'-struct', structname) without luck.
Do I have to do a sort of nested loop to save all contents to disk?
Thanks for the help.
0 Kommentare
Akzeptierte Antwort
Jonathan Sullivan
am 6 Jan. 2012
One other thing to note is that unless you are trying to save it using the most recent .mat file type (v7.3), you are limited to 2 GB. You can only save .mat files larger than 2 GB if you have a 64-bit system and have MATLAB version 7.3 (R2006b) or later. To do so, specify the correct version flag.
Example:
save('name.mat','mystructname','v7.3')
Hope this helps
Weitere Antworten (1)
Andrew Newell
am 6 Jan. 2012
What exactly is the problem you are having? If you just want to save the whole structure,
save('name.mat',structname)
will do it. Note that structname should be a string containing the name of your structure, e.g.,
structname='mystructname';
0 Kommentare
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!