>> clear = 3

1 次查看(过去 30 天)
Kevin
Kevin 2016-4-12
评论: Kevin 2016-4-12
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.

采纳的回答

Walter Roberson
Walter Roberson 2016-4-12
builtin('clear','clear')
  1 个评论
Kevin
Kevin 2016-4-12
Very nice and clean solution.

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by