Clear handle variables in GUI

2 次查看(过去 30 天)
Christina Chen
Christina Chen 2017-6-23
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 个评论
Christina Chen
Christina Chen 2017-6-23
Yes. I had saved the figure. How can I clear the save from the .m?
Jan
Jan 2017-6-23
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.

请先登录,再进行评论。

回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by