MATLAB不会抛出OutOfMemoryExceptions或最大可变大小错误

Aus*_* A. 7 matlab out-of-memory

在之前版本的MATLAB(7.6)中,我曾经得到过OutOfMemoryErrors,我觉得这有点烦人.但是自从我升级到7.11后,出于某种原因它不再抛出错误了.

这意味着当我意外地尝试使变量太大时,MATLAB shell将尝试创建变量并使我的机器停止运行.

我真的很想抛出这些错误,以便我可以优雅地退出或调试我的代码,但我无法在任何地方找到解决方案.

可能有用的细节:我在64位机器上使用OSX 10.5,具有4GB RAM.

在MATLAB 7.6中:

$ rand(50000);
??? Error using ==> rand
Maximum variable size allowed by the program is exceeded.
Run Code Online (Sandbox Code Playgroud)

在MATLAB 7.11中:

$ rand(50000);
(hang)
Run Code Online (Sandbox Code Playgroud)

SCF*_*nch 2

在版本 7.6 和 7.11 之间,Macintosh 版本的 MATLAB 从 32 位应用程序切换为 64 位应用程序。因此,现在 MATLAB 不会耗尽地址空间,而是会发生抖动。