A question about MATLAB debugging

I have a program which needs to run quite a while. There is an error in the subfunction, I want to check the error by looking the variables,but only the variables of the subfunction are displayed when I use the command {dbstop if error}. Is there anyone who can show me how to display the variables of the main function? Thank you!

Respuestas (2)

Walter Roberson
Walter Roberson el 24 de Nov. de 2012

1 voto

The workspace browser has a context selector.
Or you can use "dbup" and "dbdown" to move between contexts.
Jan
Jan el 25 de Nov. de 2012

1 voto

The functions dbup and dbdown are performed also by the popup menu "Stack: ..." in the editors toolbar. This popup changes the current workspace to the caller, the caller's caller etc, such that a fast navigation is easy.

Categorías

Más información sobre Functions en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 24 de Nov. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by