how to clear variables when exit aplication?

3 ビュー (過去 30 日間)
Lukasz Jarod
Lukasz Jarod 2014 年 12 月 14 日
コメント済み: Image Analyst 2014 年 12 月 28 日
How can i clear all variables on click X button???

回答 (1 件)

Image Analyst
Image Analyst 2014 年 12 月 14 日
You can do
clear all;
or
clearvars;
Though when it leaves the button callback function it will clear everything anyway without calling clear. If you put that in a script rather than a function, it will clear variables in the base workspace.
  6 件のコメント
Lukasz Jarod
Lukasz Jarod 2014 年 12 月 15 日
i found it , but it didnt work i want it;/
is there any comend "shut down function"??
i have program, when it eneter to the function and i will exit the program function will stil execute and it will poput new window;/
Image Analyst
Image Analyst 2014 年 12 月 28 日
I see no reason why your program will run again when you exit it. Perhaps did you double-click the run button, or hits F5 twice, when you launched it? Otherwise we'd have to see the code. All I know is that my programs don't run again once I shut them down.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by