Completely fresh start on "Run"

2 次查看(过去 30 天)
Johannes
Johannes 2018-2-10
编辑: Johannes 2018-2-10
I am currently developing an app in GUIDE and the following unwanted effect ocurred to me: Matlab preserves certain Variables, Figures and Axes when the "Run"-Button is clicked while the code ist still running.
I would rather like to have a completely new session on every run (e.g. to simulate behaviour when the app is deployed and to avoid having to close the app window before every re-run of the code (lazy-me)).
I appended
clc
cla
to my OpeningFcn, but this still does not do the trick. Problem is, that the App already started when the OpeningFcn is reached. So
cla reset
clears parts of the new instance and therefore cannot be used. How can I make Matlab purge all on every run?
Thanks in advance!

回答(0 个)

类别

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