Matlab 2021b: Run Section now interrupts currently running section?

조회 수: 10 (최근 30일)
Joseph Williams
Joseph Williams 2021년 10월 14일
댓글: Bram 2023년 1월 9일
I have recently upgraded to MATLAB 2021b. In my script, I often run one section of my code (Command+Enter), and "queue up" another section of my code to run by clicking to that section and running that section with the same hotkey. This is helpful when debugging, for example, and I want to only run only some nonsequential sections of the script.
In MATLAB 2020a, this worked without a problem: the first section would run, then the second section. Now however, when I do this same thing, the first section of code will be interrupted with the error:
Operation terminated by user during LiveEditorEvaluationHelperE2113566987 (line 8)
How can this be fixed or changed? I have looked through the Preferences and found nothing relevant.
  댓글 수: 2
Chaona Chen
Chaona Chen 2021년 10월 19일
I have this issue as well after install 2021b. It is really annoying.
Joseph Williams
Joseph Williams 2021년 10월 19일
Chaona, I am glad at least that someone else is experiencing this issue, not just me. It is such a bizarre bug.

댓글을 달려면 로그인하십시오.

답변 (3개)

Michael Zauner
Michael Zauner 2021년 10월 21일
it seems Matlab has changed the way 'Run section' works in the 2021b release.
The 'Run section' now queues the next execution instead of instantly triggering it.
  댓글 수: 1
Joseph Williams
Joseph Williams 2021년 10월 21일
Thanks for bringing visibility to this topic with your response and your insightful post.

댓글을 달려면 로그인하십시오.


Srijith Kasaragod
Srijith Kasaragod 2021년 10월 27일
편집: Srijith Kasaragod 2021년 10월 27일
Hi Joseph,
This is a known issue which the developers are already aware of and might be fixed in a future release.
A workaround could be to use "Run and Advance" ("Ctrl+Shift+Enter") instead of "Run Section", upon which none of the sections get terminated.
Hope this helps!

Joseph Williams
Joseph Williams 2021년 10월 19일
편집: Joseph Williams 2021년 10월 19일
To provide some further details, this bug appears irrespective of the code being executed. For example, it is easy to recreate this bug with the following code. First, run only the first code section, then run the second code section while the first is still executing.
%% First code section
for i = 1:2:10
fprintf('i = %d\n',i)
pause(0.5)
end
%% Second code section
for j = 2:2:10
fprintf('j = %d\n',j)
pause(0.5)
end

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by