MathGroup Archive 2005

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

Search the Archive

Clear subscripted variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58276] Clear subscripted variables
  • From: "Mukhtar Bekkali" <mbekkali at gmail.com>
  • Date: Sat, 25 Jun 2005 01:56:37 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Here is the code (x\_i stands for x subscript i):

Table[{Print[x\_i = i]; Clear[x]; Remove[x]; Unset[x]; Print[x\_i]},
{i, 1, 2}]

I expected that x\_i is cleared at the end of the loop but it isn't

If I insert Clear[Subscript] in the loop then it is cleared, but not
desirable since it clears all variables with subscripts.

What command shall I use to clear specific subscripted variables?

Mukhtar Bekkali


  • Prev by Date: Re: free packages
  • Next by Date: Re: Asking questions
  • Previous by thread: Re: General 3-state stochastic matrix (again)
  • Next by thread: Re: Clear subscripted variables