What common mistakes causes Matlab to crash?

1 Ansicht (letzte 30 Tage)
Chad Greene
Chad Greene am 21 Jul. 2014
Beantwortet: Robert Cumming am 25 Jul. 2014
Do you frequently make a mistake that causes Matlab to crash or freeze up?

Antworten (3)

Chad Greene
Chad Greene am 21 Jul. 2014
At least once a week I get the dimensions wrong in repmat, causing Matlab to try to create an impossibly large matrix.
  2 Kommentare
per isakson
per isakson am 21 Jul. 2014
Bearbeitet: per isakson am 21 Jul. 2014
Which Matlab release and which OS? Reproducible? Example?
Chad Greene
Chad Greene am 21 Jul. 2014
Mac OSX 10.8.5, Matlab 2012b.
x = 1:1e+6;
y = repmat(x,length(x),length(x));

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 21 Jul. 2014
This does not crash MATLAB for me:
x = 1:1e+6;
y = repmat(x,length(x),length(x));
I simply get an error:
Error using repmat
Maximum variable size allowed by the program is exceeded.
Error in test (line 2)
y = repmat(x,length(x),length(x));
but throwing an error is not crashing . Windows does not say "MATLAB has encountered an error and needs to close." which it would say if MATLAB itself crashed, rather than just some error in your program. It would also bring up a window asking you to send information to the Mathworks about the crash.
  4 Kommentare
Joseph Cheng
Joseph Cheng am 21 Jul. 2014
Bearbeitet: Joseph Cheng am 21 Jul. 2014
It might be an OS issue. I was able to perform the x = and y= above in Windows 64bit for Matlab 2011a. And I get an out of memory error.
Image Analyst
Image Analyst am 22 Jul. 2014
Can you type Control-Shift-Esc and look at what process is taking up the CPU?

Melden Sie sich an, um zu kommentieren.


Robert Cumming
Robert Cumming am 25 Jul. 2014
I get unrepeatable and uncontrolled crashes when using the matlab.xunit testing framework doing integration tests using GUI's.
Most of the time the run without any problems - but sometimes Matlab crashes - but I can then restart Matlab and repeat the tests just fine.
No out of memory problems as far as I can tell.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by