Add to existing .mat files

2 views (last 30 days)
Sean
Sean on 22 Jul 2011
Is there a way to add additional variables to an existing .mat file? If I save new variables to the same file it overwrites.
This came up because I have a situation where it would be convenient to have a single .mat file that holds more data than I can fit in the workspace at one time. Specifically, I want to have about 60 different 30MB uint8 arrays that I can load and process serially. (Given that I am using Windows XP 32bit, that is not going to fit in the workspace all at once to allow me to 'save' it.)
Note: I could do this with groups of .mat files, but that could get messy because I will be dealing with multiple sets of these arrays and I don't want to cross contaminate.
Thanks in advance, Sean

Accepted Answer

Bjorn Gustavsson
Bjorn Gustavsson on 22 Jul 2011
-append should do the trick. Check for spelling with: help save.
HTH,

More Answers (0)

Community Treasure Hunt

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

Start Hunting!