21

Sometimes after calling a function (which takes some 30 odd minutes to finish), you realize that you did something wrong and want to stop the program.

How do you do that in MATLAB?

What I do is shutdown MATLAB completely and restart. I think there would be a way to abort the execution of the function instead.

Anybody know what that is?

1

1 Answer 1

30

Hitting Ctrl + C usually does the trick, although sometimes it has been known to run into snags.

Sign up to request clarification or add additional context in comments.

1 Comment

I've often found that adding a drawnow() call in a loop helps Matlab catch Ctrl+C.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.