Azzera filtri
Azzera filtri

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

50 visualizzazioni (ultimi 30 giorni)
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 ?

Risposta accettata

Walter Roberson
Walter Roberson il 12 Ago 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 Commenti
Jim Riggs
Jim Riggs il 3 Ago 2018
Be kind. The answer was True five years ago when it was posted.

Accedi per commentare.

Più risposte (3)

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

Peter Marko
Peter Marko il 2 Ago 2018
Modificato: Peter Marko il 2 Ago 2018

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

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by