>> clear = 3

5 visualizaciones (últimos 30 días)
Kevin
Kevin el 12 de Abr. de 2016
Comentada: Kevin el 12 de Abr. de 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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 12 de Abr. de 2016
builtin('clear','clear')
  1 comentario
Kevin
Kevin el 12 de Abr. de 2016
Very nice and clean solution.

Iniciar sesión para comentar.

Más respuestas (1)

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

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by