how to clear variables when exit aplication?
조회 수: 6 (최근 30일)
이전 댓글 표시
How can i clear all variables on click X button???
댓글 수: 0
답변 (1개)
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
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 Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!