Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9019

Re: Grid Wont Show Formulas

From roby <roby.nowak@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Grid Wont Show Formulas
Date 2012-03-14 05:35 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jjpami$p08$1@smc.vnet.net> (permalink)
References <jjhq9e$j0q$1@smc.vnet.net>

Show all headers | View raw


On 11 Mrz., 10:12, Ride <edmun...@gmail.com> wrote:
> Hello,
>
> I am new to Mathematica and am attempting to should some formulas and workings in a grid in a notebook.  The formulas show up fine with the following entry:
>
> Grid[{{Style["Excess Return", Bold],
>     Style["Relative Return", Bold]}, {Subscript[R, p] - Subscript[R,
>      B], Subscript[R, P]/Subscript[R, B] - 1}},
>   Dividers -> {{False, True}, {False, True}}
>   ] // TraditionalForm
>
> Then I have the following entry to set the parameters for one of formulas and display the workings:
>
> Grid[{{Subscript[R, p] = 0.03,
>    Subscript[R, B] = 0.02}, {Subscript[R, p] - Subscript[R, B]  0.03 - 0.02 = 0.01, SpanFromLeft}}]
>
> However I don't get a grid showing the assignments and the workings.  Instead I get the following two errors:
>
> Set::write: Tag Plus in -0.02+0.03 is Protected. >>
> Set::write: Tag Plus in -0.02+0.03 is Protected. >>
>
> and then I get this grid:
>
> {
>  {0.03, 0.02},
>  {0.01, \[SpanFromLeft]}
>
> }
>
> What am I doing wrong?
>
> Also, I would like to be able to change the values of the assignment in the grid and have all the calculations below follow through with the assignment.  For now, I'd just like to get the grid to work.
>
> Thanks,
>
> Ride

Hi, you have to supress the assignmet.

Grid[{
  {Defer[Subscript[R, p] = 0.03], Defer[Subscript[R, B] = 0.02]},
  {Defer[Subscript[R, p] - Subscript[R, B] = 0.03 - 0.02 = 0.01],
   SpanFromLeft}}, Dividers -> All]

Robert

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Grid Wont Show Formulas Ride <edmund.r@gmail.com> - 2012-03-11 09:12 +0000
  Re: Grid Wont Show Formulas roby <roby.nowak@gmail.com> - 2012-03-14 05:35 +0000

csiph-web