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.

 Réponse acceptée

Walter Roberson
Walter Roberson le 12 Avr 2016

0 votes

builtin('clear','clear')

1 commentaire

Kevin
Kevin le 12 Avr 2016
Very nice and clean solution.

Connectez-vous pour commenter.

Plus de réponses (1)

Steven Lord
Steven Lord le 12 Avr 2016

0 votes

There are a number of techniques suggested in this posting on Loren's blog.

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by