Why does a MATLAB Class not update Properties unless debugging it?

I have a MATLAB class which is supposed to update properties automatically, but this does not occur unless I debug the program.
When I inspect the class in the variable editor while debugging, the property values are correct and the code produces the expected results.
Why is MATLAB skipping the update when I am not debugging?

 Respuesta aceptada

When a class is opened in the MATLAB Variable Editor, each of its properties' associated get methods are executed. By inspecting the property values in the Variable Editor while debugging, you may be accessing a property not accessed by your program causing code to run that would not otherwise be executed in your program.
Check the property get method for each variable to determine what code produces the expected update and either place this code in the get method of a property that is accessed within your program or place it in its own function and call it explicitly.

Más respuestas (0)

Categorías

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

Productos

Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by