MathGroup Archive 2000

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

Search the Archive

Re: Clear or remove definitions including Subscripts

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23142] Re: Clear or remove definitions including Subscripts
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 20 Apr 2000 03:21:01 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <8djl1m$7j6@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,


Subscript[a,11]=1;
Subscript[a,12]=1;

and

Unset[Subscript[a,#]] & /@ {11,12}

works fine. The other (and better way) is to
associate Subscript[a,_] with a and not with Subscript[]
i. e. use TagSet[]

a/: Subscript[a,11]=1;
a/: Subscript[a,12]=1;

than Clear[a] will remove the definitions for Subscript[a,_]

Regards
  Jens

"SANCHEZ DE LEON, Guillermo" wrote:
> 
> Dear friends,
> 
> If I write:
> 
> In[1]:= Subscript[a, 11];
> In[2]:= Subscript[a, 12];
> 
> Q1: How I can Clear or Remove the previous definitions?.
> Q2: Is it posible to clear at the same time all definitions with pattern:
> Subscript[a, i] (* i=1,2,..*)
> 
> I wish to avoid using Notation Package
> 
> I have tested:
> 
> In[3]: Clear[Subscript[a, 11]]
> Message: Clear:: "ssym": a_11 is not a symbol or a string
> 
> In[4]: Clear["\!\(a\_11\)"]
> 
> But they don`t work


  • Prev by Date: Re: PrintPrecision
  • Next by Date: Re: Clear or remove definitions including Subscripts
  • Previous by thread: Re: Clear or remove definitions including Subscripts
  • Next by thread: Re: Clear or remove definitions including Subscripts