Clear handle variables in GUI

1 visualizzazione (ultimi 30 giorni)
Christina Chen
Christina Chen il 23 Giu 2017
Risposto: Akhilesh Thakur il 31 Lug 2017
I made a GUI with user inputs stored in the handle structure. When I close the GUI and re-run it, the new variables that I stored in the handle (from the callbacks, not the createFcns) is still there, and retains the values from the last run. How do I fix this?
  3 Commenti
Christina Chen
Christina Chen il 23 Giu 2017
Yes. I had saved the figure. How can I clear the save from the .m?
Jan
Jan il 23 Giu 2017
The data are not saved in the M-files, but in the figure. You can restore the former version of the fig file using the "recent versions" backup system, if you work under Windows.

Accedi per commentare.

Risposte (1)

Akhilesh Thakur
Akhilesh Thakur il 31 Lug 2017
When you close it use this delete(hObject); or delete(handles); this should be put at bottom of closerequestfucntion

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by