What common mistakes causes Matlab to crash?

Do you frequently make a mistake that causes Matlab to crash or freeze up?

답변 (3개)

Chad Greene
Chad Greene 2014년 7월 21일

0 개 추천

At least once a week I get the dimensions wrong in repmat, causing Matlab to try to create an impossibly large matrix.

댓글 수: 2

per isakson
per isakson 2014년 7월 21일
편집: per isakson 2014년 7월 21일
Which Matlab release and which OS? Reproducible? Example?
Mac OSX 10.8.5, Matlab 2012b.
x = 1:1e+6;
y = repmat(x,length(x),length(x));

댓글을 달려면 로그인하십시오.

Image Analyst
Image Analyst 2014년 7월 21일

0 개 추천

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

Chad Greene
Chad Greene 2014년 7월 21일
I would much prefer an error message, but Matlab tries to solve it, then Matlab freezes and every other program slows to a crawl until I Force Quit Matlab.
Then upgrade. I can't try out your old version. All I can tell you is that when I run that particular code in R2014a (the latest non-beta version), it returns virtually instantly, does not freeze, and does not bog down other programs.
Joseph Cheng
Joseph Cheng 2014년 7월 21일
편집: Joseph Cheng 2014년 7월 21일
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.
Can you type Control-Shift-Esc and look at what process is taking up the CPU?

댓글을 달려면 로그인하십시오.

Robert Cumming
Robert Cumming 2014년 7월 25일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2014년 7월 21일

답변:

2014년 7월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by