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

37 次查看(过去 30 天)
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.

更多回答(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 中查找有关 Environment and Settings 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by