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


Groups > comp.soft-sys.math.mathematica > #8968 > unrolled thread

Grid Wont Show Formulas

Started byRide <edmund.r@gmail.com>
First post2012-03-11 09:12 +0000
Last post2012-03-14 05:35 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  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

#8968 — Grid Wont Show Formulas

FromRide <edmund.r@gmail.com>
Date2012-03-11 09:12 +0000
SubjectGrid Wont Show Formulas
Message-ID<jjhq9e$j0q$1@smc.vnet.net>
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


[toc] | [next] | [standalone]


#9019

Fromroby <roby.nowak@gmail.com>
Date2012-03-14 05:35 +0000
Message-ID<jjpami$p08$1@smc.vnet.net>
In reply to#8968
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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web