tags:

views:

63

answers:

2

Is there a way to end a matlab process that is taking too long to run?

ctrl+alt+delete is all I know right now and that shuts downt he program entirely.

+4  A: 

It's Ctrl+C.

Apparently it's inconsistent at times: http://www.mathworks.com/support/solutions/en/data/1-188VX/

gary comtois
+1  A: 

Control C is the answer. It will break in. However, there are cases where it still may take a while to do the interrupt. For example, if the process is trying to solve a huge linear system of equations or allocate a huge block of virtual memory, then matlab will not see the interrupt until the solver returns control to matlab itself. So it may take a while before the break happens. If this is just a long running iterative process, then the break will happen quickly.

woodchips
I also find it handy to make sure I have the Command Window active before I press Ctrl+C, as I usually have the Editor Window selected when I activatie a script.
Geodesic
Good point. Essentially, matlab needs to know that you are talking to it when you hit the ctrl+c. Otherwise it simply won't see this as an event to act on.
woodchips

related questions