MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Simple Question [Clearing Variables]


Ashok. R wrote:

> Hello all,
> 
> I have a simple question. I want to know what command to use in order to
> clear all the variables that I have defined in the notebook. I do not want
> to clear them one by one.
> 
> I treid Remove[All], but that removes the internal variables as well.
> 
> Such a simple issue, but I cannot find the answer using the online doc.
> 
> Merci

You might try:

Clear["@"]

To clear all lowercase, user-defined variables.

or

Clear["Global`*"]

To clear all user-defined variables.

Obviously, this won't work if you define your variabes somewhere other than
the Global context.  I also rarely use it -- I had to look it up.  It was a
trick mentioned in Marvin L. DeJong's "Mathematica for Calculus-Based
Physics."

It does seem to do the trick.

Tim
--
==============================================
== Timothy Klein || teece at silverklein.net   ==
==  Vanity Page: http://tinyurl.com/vkhp    ==
== ---------------------------------------- ==
== Hello_World.c: 17 Errors, 31 Warnings... ==
==============================================


  • Prev by Date: How can I graph a characteristic equation dx/dt=v?????
  • Next by Date: Re: Errors evaluating InputForm[graphic]
  • Previous by thread: Simple Question [Clearing Variables]
  • Next by thread: Re: Simple Question [Clearing Variables]