필터 지우기
필터 지우기

Can I see values of variables while a code is running.

조회 수: 35 (최근 30일)
Jeon
Jeon 2013년 8월 12일
댓글: Jim Riggs 2018년 8월 3일
MATLAB on my PC is running a code that takes a very long time with a huge iteration.
I haven't put any disp, fprintf, etc in the code. Thus, I can't see how many iterations are done.
In this situation, can I access to the variables without halting the code ?

채택된 답변

Walter Roberson
Walter Roberson 2013년 8월 12일
If you have code that is already running, and it is not already displaying the values, then there is no way to turn on displaying the values -- not without interrupting the run.
  댓글 수: 2
Peter Marko
Peter Marko 2018년 8월 2일
False - see other answers
Jim Riggs
Jim Riggs 2018년 8월 3일
Be kind. The answer was True five years ago when it was posted.

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

추가 답변 (3개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 12일
You can use display function
a=10
display(a)
But this will make your code slower

Peter Marko
Peter Marko 2018년 8월 2일
편집: Peter Marko 2018년 8월 2일

Steven Lord
Steven Lord 2018년 8월 2일
As of release R2016a the Editor has a Pause button that will pause execution at the next executable line.

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by