>> clear = 3

8 ビュー (過去 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 Center および File ExchangeEntering Commands についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by