Is there a way to display the values of all variables in my workspace while debugging MATLAB code?

14 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 21 de En. de 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.

Más respuestas (0)

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by