MathGroup Archive 2004

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

Search the Archive

Re: Q: Symbolize: How to create a table of indexed symbols?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg50928] Re: [mg25953] Q: Symbolize: How to create a table of indexed symbols?
  • From: hugo.hauge at start.no (Hugo Hauge)
  • Date: Tue, 28 Sep 2004 00:58:40 -0400 (EDT)
  • References: <BEKQ5.1282$b16.93841@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

If you prefer shorthand notation, a variation of Mark's solution below
that ensures that subscripts of matrix elements appear without a comma
separating the i and j is

Table[Subscript[a, 10 i+j], {i, 3}, {j, 2}]

hugo hauge


On Thu, 16 Nov 2000 05:54:41 GMT, Mark Harder wrote:
>Claudius,
>
>Clear[a];
>Table[Subscript[a, i, j], {i, 3}, {j, 2}]
>
>
>
>-mark harder
>
>
>
>-----Original Message-----
>From: Claudius Schnoerr <Claudius.Schnoerr at DDG.de>
To: mathgroup at smc.vnet.net
>Subject: [mg50928] [mg25953] Q: Symbolize: How to create a table of indexed
symbols?
>
>
>>Hello,
>>
>>due to the subscripts I include a notebook in ascii at the end of
this
>mail.
>>
>>I first symbolize symbols a_,_ intended to be the elements of a
matrix.
>>Then manually I can create a matrix out of these symbols.
>>
>>What I would like ist to create the matrix by a Table[]-statement.
>>
>>
>>Any hints are welcome.
>>
>>Please email any answers directly to
>>
>> schnoerr at mailzone.com
>>
>>Thank you in advance,
>>
>>Claudius
>>
>>
>>(***********************************************************************
>>
>>                    Mathematica-Compatible Notebook
>>
>>This notebook can be used on any computer system with Mathematica
4.0,
>>MathReader 4.0, or any compatible application. The data for the
notebook
>>starts with the line containing stars above.
>>
>>To get the notebook into a Mathematica-compatible application, do
one of
>>the following:
>>
>>* Save the data starting with the line of stars above into a file
>>  with a name ending in .nb, then open the file inside the
application;
>>
>>* Copy the data starting with the line of stars above to the
>>  clipboard, then use the Paste menu command inside the application.
>>
>>Data for notebooks contains only printable 7-bit ASCII and can be
>>sent directly in email or through ftp in text mode.  Newlines can be
>>CR, LF or CRLF (Unix, Macintosh or MS-DOS style).
>>
>>NOTE: If you modify the data for this notebook not in a Mathematica-
>>compatible application, you must delete the line below containing
the
>>word CacheID, otherwise Mathematica-compatible applications may try
to
>>use invalid cache data.
>>
>>For more information on notebooks and Mathematica-compatible
>>applications, contact Wolfram Research:
>>  web: <a href="http://www.wolfram.com";>http://www.wolfram.com</a>
>>  email: info at wolfram.com
>>  phone: +1-217-398-0700 (U.S.)
>>
>>Notebook reader applications are available free of charge from
>>Wolfram Research.
>>***********************************************************************)
>>
>>(*CacheID: 232*)
>>
>>
>>(*NotebookFileLineBreakTest
>>NotebookFileLineBreakTest*)
>>(*NotebookOptionsPosition[      3235,        108]*)
>>(*NotebookOutlinePosition[      3890,        131]*)
>>(*  CellTagsIndexPosition[      3846,        127]*)
>>(*WindowFrame->Normal*)
>>
>>
>>
>>Notebook[{
>>Cell[BoxData[
>>    \(\(Needs["\<Utilities`Notation`\>"];\)\)], "Input"],
>>
>>Cell["What works:", "Text"],
>>
>>Cell[BoxData[
>>    RowBox[{
>>      RowBox[{"Symbolize", "[",
>>        TagBox[\(a\_\(_Integer, _Integer\)\),
>>          NotationBoxTag,
>>          TagStyle->"NotationTemplateStyle"], "]"}], ";"}]],
"Input"],
>>
>>Cell[BoxData[
>>    \(\(A = {{a\_\(1, 1\), a\_\(1, 2\)}, {a\_\(2, 1\),
>>            a\_\(2, 2\)}};\)\)], "Input"],
>>
>>Cell[CellGroupData[{
>>
>>Cell[BoxData[
>>    \(A\  // \ MatrixForm\)], "Input"],
>>
>>Cell[BoxData[
>>    TagBox[
>>      RowBox[{"(", "\[NoBreak]", GridBox[{
>>            {\(a\_\(1, 1\)\), \(a\_\(1, 2\)\)},
>>            {\(a\_\(2, 1\)\), \(a\_\(2, 2\)\)}
>>            }], "\[NoBreak]", ")"}],
>>      (MatrixForm[ #]&)]], "Output"]
>>}, Open  ]],
>>
>>Cell[CellGroupData[{
>>
>>Cell[BoxData[
>>    \(A /. a\_\(1, 1\) \[Rule] 1\  // \ MatrixForm\)], "Input"],
>>
>>Cell[BoxData[
>>    TagBox[
>>      RowBox[{"(", "\[NoBreak]", GridBox[{
>>            {"1", \(a\_\(1, 2\)\)},
>>            {\(a\_\(2, 1\)\), \(a\_\(2, 2\)\)}
>>            }], "\[NoBreak]", ")"}],
>>      (MatrixForm[ #]&)]], "Output"]
>>}, Open  ]],
>>
>>Cell[BoxData[
>>    \(What\ I\ would\ like\ is\ to\ get\ the\ matrix\ A\ as\ above\
\
>>consisting\ of\ symbols\ by\ the\ Table -
>>      statement . \
>>          Instead\ there\ are\ only\ \(\(a\_\(j, i\)\)\(:\)\)\)],
"Text"],
>>
>>Cell[CellGroupData[{
>>
>>Cell[BoxData[
>>    \(A = Table[a\_\(j, i\), {j, 2}, {i, 2}]\)], "Input"],
>>
>>Cell[BoxData[
>>    \({{a\_\(j, i\), a\_\(j, i\)}, {a\_\(j, i\), a\_\(j, i\)}}\)],
>"Output"]
>>}, Open  ]]
>>},
>>FrontEndVersion->"4.0 for Microsoft Windows",
>>ScreenRectangle->{{0, 1152}, {0, 766}},
>>WindowSize->{496, 670},
>>WindowMargins->{{Automatic, 87}, {21, Automatic}}
>>]
>>
>>
>>(***********************************************************************
>>Cached data follows.  If you edit this Notebook file directly, not
using
>>Mathematica, you must remove the line containing CacheID at the top
of
>>the file.  The cache data will then be recreated when you save this
file
>>from within Mathematica.
>>***********************************************************************)
>>
>>(*CellTagsOutline
>>CellTagsIndex->{}
>>*)
>>
>>(*CellTagsIndex
>>CellTagsIndex->{}
>>*)
>>
>>(*NotebookFileOutline
>>Notebook[{
>>Cell[1717, 49, 70, 1, 30, "Input"],
>>Cell[1790, 52, 27, 0, 33, "Text"],
>>Cell[1820, 54, 201, 5, 31, "Input"],
>>Cell[2024, 61, 111, 2, 30, "Input"],
>>
>>Cell[CellGroupData[{
>>Cell[2160, 67, 52, 1, 30, "Input"],
>>Cell[2215, 70, 237, 6, 43, "Output"]
>>}, Open  ]],
>>
>>Cell[CellGroupData[{
>>Cell[2489, 81, 77, 1, 30, "Input"],
>>Cell[2569, 84, 225, 6, 43, "Output"]
>>}, Open  ]],
>>Cell[2809, 93, 221, 4, 51, "Text"],
>>
>>Cell[CellGroupData[{
>>Cell[3055, 101, 71, 1, 30, "Input"],
>>Cell[3129, 104, 90, 1, 30, "Output"]
>>}, Open  ]]
>>}
>>]
>>*)
>>
>>
>>
>>
>>(***********************************************************************
>>End of Mathematica Notebook file.
>>***********************************************************************)
>>
>>


  • Prev by Date: Re: problem with very slow matrix function
  • Next by Date: How to implement extrapolation sequence in NDSolve?
  • Previous by thread: Re: problem with very slow matrix function
  • Next by thread: How to implement extrapolation sequence in NDSolve?