GUIDE Interface: Do not populate when loading
1 回表示 (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!