I have a script where I am writing variables in the workspace to MAT-files using the following syntax:
X = zeros(100,1);
save('test.mat', '-v7', 'X')
I prefer the -v7 option because the files are smaller and the SAVE command is quicker. However, if I try to save a file that is too large for -v7, I want to be able to switch to -v7.3 automatically. How can I do this?