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 commentaires

James Tursa
James Tursa le 5 Déc 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
Jan le 6 Déc 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
Stephen23 le 6 Déc 2017
save('Blocks.mat', '-v7.3', '-struct','Blocks')
Jan
Jan le 6 Déc 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
Jan le 6 Déc 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

Commenté :

Jan
le 6 Déc 2017

Community Treasure Hunt

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

Start Hunting!

Translated by