run function ButtonPushed (app, event) when you open the GUI

3 vues (au cours des 30 derniers jours)
Ermanno Manca
Ermanno Manca le 10 Juil 2020
Commenté : Ermanno Manca le 15 Juil 2020
Hey,
I'd like my GUI to run the function that's behind "ButtonPushed" immediately after opening it.
Is there any way to do it? I want to set starting points and plot them, these then get changed.
In the attached picture you see what i get when i push the Start Button. I managed to set initial Values for every field, but when i open the GUI the plot only starts by pushing "Start". I want it to use the Values in the edit fields and plot by it's own, without clicking on "Start".
Thanks a lot and best regards,
Ermanno

Réponse acceptée

Anirudh Singh
Anirudh Singh le 13 Juil 2020
You can put code in StartupFcn Callback, which executes when the app starts up. So that, when you open the app function under StartupFcn, will be running automatically.
For more info, you can refer documentation :StartupFcn
  1 commentaire
Ermanno Manca
Ermanno Manca le 15 Juil 2020
Thanks a lot, exactly what i was looking for!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Downloads dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by