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 Commento

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?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange

Prodotti

Release

R2021b

Richiesto:

il 6 Set 2022

Commentato:

Jan
il 7 Set 2022

Community Treasure Hunt

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

Start Hunting!

Translated by