Effacer les filtres
Effacer les filtres

Creating an "update" button in GUI

3 vues (au cours des 30 derniers jours)
Jared
Jared le 2 Nov 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?

Réponse acceptée

Walter Roberson
Walter Roberson le 2 Nov 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.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by