How to kill an execution in app designer ?
94 views (last 30 days)
More Answers (1)
Image Analyst on 2 May 2020
That's not a good idea. It would be better to abort your code gracefully. Like have a check box on your GUI that says "Finish Now" and if the user checks it, it gets out of your function gracefully and leaves your program running. Like if you're in a loop
for k = 1 : 1000000
% Some intensive code.....
% Now see if user wants to bail out:
return; % or break. to get out of the function (if return is used), or the for loop (if break is used).
Doing it like you asked is very bad programming practice in my opinion, and probably most everyone else's also.