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

33 ビュー (過去 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 Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by