How to view content of a variable in a script while a called function is running and paused?

4 Ansichten (letzte 30 Tage)
I want to view a variable content while a subsequent function is running and paused.
Example:
var_of_interest=ZZ(3,5);
.
.
.
parfor i=1:10
called_function(x,y,z) % var_of_interest is not an argument
end
I want to view content of "var_of_interest" at the time I paused the code while it was looping in a parfor loop with a function.

Antworten (1)

Jan
Jan am 20 Jan. 2017
A bold guess:
var_of_interest=ZZ(3,5);
disp(var_of_interest)
drawnow;
parfor i=1:10
called_function(x,y,z) % var_of_interest is not an argument
end
This looks a kind of trivial, so perhaps I do not understand the question.
  3 Kommentare
Walter Roberson
Walter Roberson am 20 Jan. 2017
We have seen reports about the workspace browser not refreshing during debugging. I have not replicated that myself but there have been a few people reporting it.
In the meantime, you can go to the command line and dbup until you get to the proper workspace and thrn disp the variable

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Parallel for-Loops (parfor) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by