Clear handle variables in GUI

2 ビュー (過去 30 日間)
Christina Chen
Christina Chen 2017 年 6 月 23 日
回答済み: Akhilesh Thakur 2017 年 7 月 31 日
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 Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by