Filter löschen
Filter löschen

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

35 Ansichten (letzte 30 Tage)
Jeon
Jeon am 12 Aug. 2013
Kommentiert: Jim Riggs am 3 Aug. 2018
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 ?

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 12 Aug. 2013
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 Kommentare
Peter Marko
Peter Marko am 2 Aug. 2018
False - see other answers
Jim Riggs
Jim Riggs am 3 Aug. 2018
Be kind. The answer was True five years ago when it was posted.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (3)

Azzi Abdelmalek
Azzi Abdelmalek am 12 Aug. 2013
You can use display function
a=10
display(a)
But this will make your code slower

Peter Marko
Peter Marko am 2 Aug. 2018
Bearbeitet: Peter Marko am 2 Aug. 2018

Steven Lord
Steven Lord am 2 Aug. 2018
As of release R2016a the Editor has a Pause button that will pause execution at the next executable line.

Kategorien

Mehr zu Entering Commands finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by