In a previous version of MATLAB (7.6), I used OutOfMemoryErrors, which I thought was pretty annoying. But since I upgraded to 7.11, for some reason it no longer throws errors.
This means that when I accidentally try to make a variable too large, the MATLAB shell will try to create the variable and stop my machine.
I would really like these errors to be thrown, so that I can exit gracefully or debug my code, but I cannot find a solution anywhere.
Perhaps useful information: I use OSX 10.5 on a 64-bit machine with 4 GB of RAM.
In MATLAB 7.6:
$ rand(50000); ??? Error using ==> rand Maximum variable size allowed by the program is exceeded.
In MATLAB 7.11:
$ rand(50000); (hang)
Austin A.
source share