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.

 Risposta accettata

Walter Roberson
Walter Roberson il 12 Apr 2016

0 voti

builtin('clear','clear')

1 Commento

Kevin
Kevin il 12 Apr 2016
Very nice and clean solution.

Accedi per commentare.

Più risposte (1)

Steven Lord
Steven Lord il 12 Apr 2016

0 voti

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

Categorie

Scopri di più su Get Started with MATLAB in Centro assistenza e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by