Is there a way to display the values of all variables in my workspace while debugging MATLAB code?
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I would like the ability to display the values of all variables in workspace while I am debugging my code. Currently, I am able to hover my mouse over a variable name to display its value, but I would like to be able to display the values of all variables in a list.
Akzeptierte Antwort
MathWorks Support Team
am 21 Jan. 2010
The ability to display an entire list of variable values when debugging is not available in MATLAB. To work around this issue, create a file with code similar to the following:
myvals = whos;
for n = 1:length(myvals)
myvals(n).name
eval(myvals(n).name)
end
This script can be called from the "K>>" prompt when debugging MATLAB files to list the values of variables in the base workspace.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!