Clear Filters
Clear Filters

How to end the running of a script in a subfunction?

8 views (last 30 days)
I use matlab 2014b where the script and function are in different m files. Is it possible to end the running of the script in a function?

Accepted Answer

Walter Roberson
Walter Roberson on 3 Dec 2018
error('Rage quitting!')
  7 Comments
Walter Roberson
Walter Roberson on 2 Jan 2019
Then, NO, you cannot do that without seeing the error message -- not unless the program cooperates to try/catch to detect the quit and stop itself nicely.

Sign in to comment.

More Answers (1)

madhan ravi
madhan ravi on 3 Dec 2018
function...
input('just press control + c to stop script')
end

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!