Modifying a script terminates its execution now?

Consider the following toy little script:
while true
i=1;
disp(i);
pause;
end
Save it and start running it in a Matlab window. Now open another Matlab window and modify it, say by setting
i=2;
and save it. If you are running Matlab R2021b, the script in the first window will terminate with a message that execution was terminated by user. This does not happen in R2020a, however.
This is a huge change in Matlab, as we are no longer able to run slight variations of a script simultaneously on different windows, unless we actually save them as different scripts. Has anyone else encountered this issue? Was it advertised as a new feature?

1 个评论

What happens, if you use functions instead of scripts? Varying the input arguments is smarter than modifying the code. And if you have a bunch of Matlab sessions running different scripts, which are edited during they are running, how do you keep the overview?

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

版本

R2021b

评论:

Jan
2022-9-7

Community Treasure Hunt

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

Start Hunting!

Translated by