How to stop a script from executing

90 views (last 30 days)
Chris
Chris on 16 Aug 2011
Commented: Hernan Larriva on 3 Apr 2023
This is a basic question but I am wondering how you can halt a script from executing mid script.

Accepted Answer

bym
bym on 16 Aug 2011
Ctrl-c (control + c keys)
  4 Comments
Hayden Mann
Hayden Mann on 13 Dec 2018
Make sure you click on the command window then press Ctrl + c.

Sign in to comment.

More Answers (1)

Paulo Silva
Paulo Silva on 16 Aug 2011
%code
error('Mid script reached, this error message was made on purpose')
%code
Another alternative could be the use of the return function

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!