MATLAB: Large structures won’t save

memorysave

I have a large structure 'L' containing data (700MB). When I try to save it I get:
>save('test','L')
Out Of Memory during serialization of the Subsystem Data
??? Error using ==> save
Error closing file c:\…\MATLAB\test.mat
I'm running in Matlab 2011a on WinXP 32bit. If L is < ~500Mb it will save,more importantly and it works fine in Matlab 2007a and 2009b on the same machine.
memory gives the following output: >memory
Maximum possible array: 1022 MB
Memory available for all arrays: 1642 MB
Memory used by MATLAB: 1100 MB
Physical Memory (RAM): 3326 MB
Thanks for any ideas!

Best Answer

Turns out somewhere between R2009 and R2011 the "save" function changed in such a way that a copy of the structure is made by the "save" command - thus exceeding the available memory and breaking code that worked on the earlier version. The fix is to use save with the -V7.3 option.
save('-v7.3','data')
Related Question