>> clear = 3

4 vues (au cours des 30 derniers jours)
Kevin
Kevin le 12 Avr 2016
Commenté : Kevin le 12 Avr 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.

Réponse acceptée

Walter Roberson
Walter Roberson le 12 Avr 2016
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
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 Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by