MathGroup Archive 1997

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

Search the Archive

Re: Subscripts??

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8991] Re: [mg8910] Subscripts??
  • From: jpk at max.mpae.gwdg.de
  • Date: Tue, 7 Oct 1997 03:35:37 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,


> First I would like to thank all of those who helped me with my questions
> before (Union and Precision) It helped me alot.
> 
> So now for the new question: How to use Subscripts??
> 
> Subscripts are a very nice and practical idea but gives me some hard time.
> 
> 1. Subscript[A,1] // N  gives  Subscript[A,1.]  :((
> Or:  Subscript[A,E] // N gives Subscript[A,2.7...]
> 
> 2. Giving N[Subscript[a_,n_Integer]]:=Subscript[a,n] Does not work.
> 

Ok Mathematica 3.0 has som new attributes NHold* ones. The attributes prevent 
that N[fun[i_Integer]] convert to fun[i_Real] so You need a defintion like

Unprotect[Subscript]
SetAttributes[Subscript,NHoldAll]
Protect[Subscript]

to prevent the indexes from convert.

> 3. So you tell me I should use the Utilities`Notation` package, here we
> go:
> 
> <<Utilities`Notation`
> Symbolize[A_1]   << Ok put here a subscript.
> 
> But now:
> Symbolize[A_2]
> 
> gives :
> 
> Symbolize::"boxSymbolExists": 
> "Warning: The box structure attempting to be symbolized has a similar
> or \ identical symbol already defined, possibly overriding previously
> symbolized \ box structure."  
> 
> ??? 
> 
> And effectively if you try and use these kind of variables together you
> will have some really hard time (some would be undefined).
> 
> So how do I get out of all this??
> 

Mathematica will interpret A_1 still as a pattern

Symbolize[Subscript[A,1]]

will probably work.


Hope that helps
Jens


  • Prev by Date: Limit[ E^(a x), x->-Infinity]
  • Next by Date: ReadList
  • Previous by thread: Re: Subscripts??
  • Next by thread: Re: Compiled Functions and Mathgroup Archive