Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Curious on the .nb format

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92248] Curious on the .nb format
  • From: Mariano Suárez-Alvarez <mariano.suarezalvarez at gmail.com>
  • Date: Wed, 24 Sep 2008 03:31:46 -0400 (EDT)

Hi all,

Peeking inside a .nb file I find the following:

  Cell[BoxData[
   RowBox[{
    RowBox[{
     RowBox[{"j", "[",
      RowBox[{"\[Lambda]_", ",", "n_"}], "]"}], " ", ":=", " ",
     RowBox[{"SparseArray", "[", "\[IndentingNewLine]",
      RowBox[{
       RowBox[{"{",
        RowBox[{
         RowBox[{
          RowBox[{"Band", "[",
           RowBox[{"{",
            RowBox[{"1", ",", "1"}], "}"}], "]"}], " ", "\[Rule]", "
",
          "\[Lambda]"}], ",", " ",
         RowBox[{
          RowBox[{"Band", "[",
           RowBox[{"{",
            RowBox[{"2", ",", "1"}], "}"}], "]"}], "\[Rule]", "1"}]}],
"}"}],
       ",", "\[IndentingNewLine]",
       RowBox[{"{",
        RowBox[{"n", ",", "n"}], "}"}]}], "\[IndentingNewLine]",
"]"}]}],
    ";"}]], "Input",
   CellChangeTimes->{{3.427652733785487*^9, 3.427652843372787*^9}}],

as the representation of what the front end displays as

  j[\[Lambda]_, n_] := SparseArray[
     {Band[{1, 1}] -> \[Lambda], Band[{2, 1}] -> 1},
     {n, n}
     ];

Is there *really* a need to save things like

  RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}]

?

Is there a semantic difference from that to

  RowBox[{"{", "1", ",", "1", "}"}]

?

That makes the usual complains about the verbosity of XML seem
so irrelevant ;)

-- m


  • Prev by Date: Re: Re: External packages, Manipulate, and MathPlayer
  • Next by Date: Re: Diagonalize sparse matrix and documentation in version 6.
  • Previous by thread: Lagrangian/KKT conditions.
  • Next by thread: Mathematica Special Interest Group (Washingtton DC Area)