Clear handle variables in GUI

조회 수: 1 (최근 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 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