How can I save a gui window with input data ?

2 Ansichten (letzte 30 Tage)
Omid Rezapour
Omid Rezapour am 30 Sep. 2019
Kommentiert: Ankit am 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 Kommentar
Ankit
Ankit am 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

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Scope Variables and Generate Names finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by