How to kill an execution in app designer ?
109 ビュー (過去 30 日間)
その他の回答 (1 件)
Image Analyst 2020 年 5 月 2 日
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.