Creating an "update" button in GUI

2 visualizaciones (últimos 30 días)
Jared
Jared el 2 de Nov. de 2011
I have a few check boxes and toggles which will affect the display of a plot I create with a GUI.
If I create a plot, then the user selects some of the check boxes to change the display, I think I need an update button to cause the data to be re-plotted using the new settings. Is there some command to, on the pressing of the "update button", jump back to the plot section of code?

Respuesta aceptada

Walter Roberson
Walter Roberson el 2 de Nov. de 2011
No, there is not. In MATLAB, there is no way to jump back to anything.
What you should do is put the plotting code in to a function, and call that function from your regular code to do the initial plot. Then, in the callback for your Update button, call the plotting function.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by