Is it possible to 'clear all' variables except one?
조회 수: 81 (최근 30일)
이전 댓글 표시
I am using clear all command. But I wan to keep just one of the varibles. Lets say the name of that variable is 'var'.
댓글 수: 0
채택된 답변
추가 답변 (2개)
Walter Roberson
2019년 9월 5일
No, that is not possible using "clear all"
The only time you should ever use "clear all" is if you are deliberately resetting your entire MATLAB session. If it would not be acceptable to quit and re-enter MATLAB at that point then you should not use "clear all"
You should have a look at the clearvars() command, which does have an -except option.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!