MATLAB: Do I receive an error about closing a MAT file in the TEMP directory when I attempt to save a large number of variables using the SAVE command in MATLAB 7.9 (R2009b)

closingerrorfilematsaveSystemTestusing

I get the following error when I try to run a test that loads large data in SystemTest:
Error closing file C:\Temp\test15016941.mat

Best Answer

This is due to the way logged data is saved in MAT files in MATLAB 7.9 (R2009b).
As a workaround, use the -v7.3 option while saving data to MAT files:
save -v7.3 mymat