GUIDE Interface: Do not populate when loading

조회 수: 1 (최근 30일)
Robert Worm
Robert Worm 2018년 9월 4일
답변: Walter Roberson 2018년 9월 4일
When running a GUIDE interface data from previous sessions seem to be preloaded.
Instead only the bare interface should be displayed - without any data plotted and items selected.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 4일
In the case where a GUIDE GUI has been made invisible but not closed, then running the .m will make the GUI visible again without changing its state.
Other than that, if you accidentally save the GUI inside GUIDE after you have run the code, then what is saved is the state at the time you request the save, which would include anything that the user had changed. In order to get around this problem, probably the best approach is to go back into GUIDE, clear the state of those fields, and then save again, so that the next time you run, you get the empty version. But another possibility is to add code to the OpenFcn callback to go in and reset the state before the user has a chance to interact with it. That can be a good approach sometimes, especially if you have added some kind of "reset" button for the user to be able to reuse the program without closing the GUI.

카테고리

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