Modifying a script terminates its execution now?
Afficher commentaires plus anciens
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 commentaire
Jan
le 7 Sep 2022
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?
Réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!