Saving large struct files
Show older comments
I am trying to save a struct file previously of size 84 MB. After modifying some fields, when I use the save function i.e. save('Blocks','-v7.3'), it creates a new file with size 17 GB. Any ideas to work around this?
5 Comments
James Tursa
on 5 Dec 2017
We would need to see more details about this struct and how you build/modify it. E.g., maybe the struct has a lot of shared data variable fields that get duplicated when saved.
Jan
on 6 Dec 2017
The command save('Blocks','-v7.3') stores all variables of the workspace to the file "Block.mat". Do you mean:
save('Blocks.mat', '-v7.3', 'Blocks', '-struct')
Stephen23
on 6 Dec 2017
save('Blocks.mat', '-v7.3', '-struct','Blocks')
Jan
on 6 Dec 2017
[MOVED FROM FLAG]
Eugene Ben-Awuah wrote:
The file I am trying to save is already a struct file. I get this error message: "The argument to -STRUCT must be the name of a scalar structure variable"
@Eugene: Please use flags only to inform the admins or editors about contents, which is not appropriate for the forum, e.g. due to rudeness. Thanks.
Jan
on 6 Dec 2017
@Eugene: Please do not let us guess all details. I do not know, what a "struct file" is and what the contents of the variable Blocks is. Currently you do not provide any details beside the sizes of the MAT file.
Answers (0)
Categories
Find more on Structures 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!