MATLAB Answers

>> clear = 3

2 views (last 30 days)
Kevin on 12 Apr 2016
Commented: Kevin on 12 Apr 2016
Assume that I accidentally type the following command in MATLAB,
>> clear = 3
This will create a variable called "clear" in the base workspace. Now how do I clear this variable?
Assuming that I don't want to close MATLAB and start MATLAB again.

Accepted Answer

Walter Roberson
Walter Roberson on 12 Apr 2016
  1 Comment
Kevin on 12 Apr 2016
Very nice and clean solution.

Sign in to comment.

More Answers (1)

Steven Lord
Steven Lord on 12 Apr 2016
There are a number of techniques suggested in this posting on Loren's blog.

Community Treasure Hunt

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

Start Hunting!