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
Jan
2022년 9월 7일
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에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!