How can I save a gui window with input data ?

2 vues (au cours des 30 derniers jours)
Omid Rezapour
Omid Rezapour le 30 Sep 2019
Commenté : Ankit le 30 Sep 2019
Hello
I made a gui window for calculating some parameters (photo in attachment). When I run the gui program, I insert the inputs in yellow edit boxes and push the "Calculate Outputs" button, then the outputs are shown in green static boxes. My Problem is that when I close this gui window and open (run) it in the next time, the inputs are gone (reset) and I should insert them again. Is there any way to keep (save) the input numbers in the yellow boxes for the next time ?
Thank you
Photo.png
  1 commentaire
Ankit
Ankit le 30 Sep 2019
Yes! you can add may be following menu to your GUI
  • Initialize (Initalize with some default values)
  • Save GUI state (saving GUI data as *.mat file) (for e.g saving VehicleMass = app.xxx.Value etc)
  • Load GUI state (loading the desired GUI state) - loading *.mat fle and using "evalin" function read the values

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Scope Variables and Generate Names 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