Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Controlling evaluation in Symbolize

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30352] Controlling evaluation in Symbolize
  • From: Richard Gass <gass at physics.uc.edu>
  • Date: Sat, 11 Aug 2001 03:40:17 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I need to create a number of symbols (things like SubscriptBox["B", 
"r"]). I want this to behave as a single object so I need to 
Symbolize it. My symbols will all be subscripts but my question is 
more general. Here is a simple example: First I load some packages 
and set the coordinate system

<< Calculus`VectorAnalysis`
<< Utilities`Notation`
SetCoordinates[Spherical[r, \[Theta], \[Phi]]]
  (* now from the palette I Symbolize B sub anything *)

\!\(\*
   RowBox[{"Symbolize", "[",
     TagBox[\(B\_x_\),
       NotationBoxTag,
       TagStyle->"NotationTemplateStyle"], "]"}]\)

(* Next I want to generate the needed symbols. *)


In[9]:=
\!\(Table[B\_\(\(Coordinates[]\)[\([i]\)]\), {i, 1, 3}]\)

Out[9]=
\!\({B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\),
     B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\),
     B\_\(\(Coordinates[]\)[\([\)\(i\)\(]\)]\)}\)

(* But Symbolize freezes the evaluation so that Coordinate[][[i]] 
does not evaluate. What I want is

In[4]:=
\!\(Table[B\_\(\(Coordinates[]\)[\([i]\)]\), {i, 1, 3}]\)

Out[4]=
\!\({B\_r, B\_\[Theta], B\_\[Phi]}\)

This code was of course, run before I symbolized B sub anything. What 
I want to do is to force the evaluation of Coordinates[][[i]] so that 
I generate B sub r, B sub theta and B sub phi as proper symbols. 
Since I do not know in advance what  coordinate system will be used, 
just typing them in is not an option *) Any ideas?
-- 
Richard Gass
Department of Physics
University of Cincinnati
Cincinnati, OH 45221
phone- 513-556-0519
E-Mail gass at physics.uc.edu


  • Prev by Date: Re: Problem with FourierTransform
  • Next by Date: Re: Problem with FourierTransform
  • Previous by thread: New Mathematica Courses
  • Next by thread: RE: Controlling evaluation in Symbolize