Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Notation and Symbolize' topicStudent Support Forum > General > "Notation and Symbolize"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Randy Silvers
10/17/99 06:37am

>I have several variables which have similar names. I want at the start of the notebook to symbolize each of these without having to enter a separate command for each one. How can I symbolize a list of variables? Is there a way to symbolize all varialbes that have subscripts of a certain character?
>
>For example, *L1, *L2, *H1, *H2, *L1`, *L2`, *H1`, *H2` are eight variables I want to symbolize (I have subscripted the L1, L2, ... and the latter four are all primes). The following works:
>
>Symbolize[*L1]
>Symbolize[*L2]
>
>I would like to do this all in one string as:
>
>Symbolize[*L1,*L2].
>This does not work, as Symbolize[{*L1,*L2}] and Symbolize[NotationTagBox[{*L1,*L2}]] also don't work.
>
>Finally, is there a way to symbolize every term that is *subscript?
>
>As in: Symbolize[*subscript, *subscript&prime]
>
>Thanks,
>Randy

Here is the code I am using. I choose Symbolize from the Notation palette, and it works well when I use only one variable, but not with a list.

<< Utilities`Notation`

\!\(\*
RowBox[{''Symbolize'', ''['',
TagBox[\(\(w\_1\)\&^\),
NotationBoxTag,
TagStyle->''NotationTemplateStyle''], '']''}]\)

\!\(\*
RowBox[{''Symbolize'', ''['',
TagBox[\(\(w\_2\)\&^\),
NotationBoxTag,
TagStyle->''NotationTemplateStyle''], '']''}]\)

\!\(\*
RowBox[{''Symbolize'', ''['',
TagBox[\(\(w\_1\)\&^\^\[Prime]\),
NotationBoxTag,
TagStyle->''NotationTemplateStyle''], '']''}]\)

(*When I try a list, I obtain the following error messages*)
\!\(Symbolize[NotationBoxTag[{\[Pi]\_L1, \[Pi]\_L2}]]\)

\!\(List::''string'' \(\(:\)\(\ \)\)
''String expected at position \!\(1\) in \!\({\[Pi]\_L1, \[Pi]\_\({True, \
True}\)}\).''\)

\!\(List::''string'' \(\(:\)\(\ \)\)
''String expected at position \!\(2\) in \!\({\[Pi]\_L1, \[Pi]\_\({True, \
True}\)}\).''\)

\!\(StringJoin::''string'' \(\(:\)\(\ \)\)
''String expected at position \!\(1\) in \!\(\[Pi]\_L1 <> \[Pi]\_\({True, \
True}\)\).''\)

\!\(StringJoin::''string'' \(\(:\)\(\ \)\)
''String expected at position \!\(2\) in \!\(\[Pi]\_L1 <> \[Pi]\_\({True, \
True}\)\).''\)

\!\(Names::''string'' \(\(:\)\(\ \)\)
''String expected at position \!\(1\) in \!\(Names[\(\(\(\(\[LeftSkeleton] \
57 \[RightSkeleton]\)\)[\(\(\[Pi]\_L1 <> \[Pi]\_\({True, \
True}\)\)\)]\)\)]\).''\)

(*Finally, am I correct that it will still symbolize each of the following, and that the message is merely a warning*)

\!\(\*
RowBox[{''Symbolize'', ''['',
TagBox[\(\[Pi]\_H2\),
NotationBoxTag,
TagStyle->''NotationTemplateStyle''], '']''}]\)

\!\(\*
RowBox[{''Symbolize'', ''['',
TagBox[\(\[Pi]\_L2\),
NotationBoxTag,
TagStyle->''NotationTemplateStyle''], '']''}]\)

\!\(General::''spell1'' \(\(:\)\(\ \)\)
''Possible spelling error: new symbol name \
\''\!\(\[Pi]\[UnderBracket]Subscript\[UnderBracket]L2\)\'' is similar to \
existing symbol \''\!\(\[Pi]\_H2\)\''.''\)

Thanks,
Randy

URL: ,

Subject (listing for 'Notation and Symbolize')
Author Date Posted
Notation and Symbolize Randy Silvers 09/28/99 07:32am
The Code Randy Silvers 10/17/99 06:37am
< Previous CommentHelp | Reply To Comment | Reply To Topic