Why do both MATLAB and my computer freeze when I run long scripts?

9 views (last 30 days)
Why do both MATLAB and my computer freeze when I run long scripts?
I have six MATLAB sessions running. When I am running long scripts, MATLAB slows the whole PC down to the point where the desktop and other applications become impossible to use. The computer seems to ignore the mouse and keyboard inputs. The problem goes away when the script is finished.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This is due to MATLAB being single-threaded and using as large a percentage of the processing power as it can. As a potential workaround, you can put the command DRAWNOW in your loops or long scripts to allow MATLAB to handle pending events, like a Ctrl-C or figure/desktop refreshing.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!