From: Murray Eisenberg on 17 Apr 2010 06:04 What you advise is, I believe, exactly the same thing I described, which did not work. But now it's working. They say that "insanity is trying the same thing and expecting different results", but apparently that does not apply in this case! On 4/16/2010 7:11 AM, David Park wrote: > Put the Dynamic[x] in an Inline Cell within the Text cell. Select it and > Evaluate it in place. > > Then when you evaluate x=5, or Clear[x] elsewhere in the notebook the value > in the Text cell should change. Anyway, it works for me. > > > David Park > djmpark(a)comcast.net > http://home.comcast.net/~djmpark/ > > > > From: Murray Eisenberg [mailto:murray(a)math.umass.edu] > > > I cannot get this to work: I created two new Input cells: > > Dynamic[x] > x = 5 > > Then I created a Text cell: > > the value is as you can see > > and into it, between "is " and " as" pasted the Dynamic[x] expression > copied from the first of the two Input cells -- even using Ctrl-( to > create explicitly an Inline cell there. > > Still, selecting that pasted expression and using the menu item > Evaluation> Evaluate in place seems to do nothing. > > What am I doing wrong? > > Also, if somehow this can be made to work, would the value of Dynamic[x] > in the Inline cell then automatically update when the value of x > changes? (My understanding of Dynamic tells me it should.) > > > On 4/14/2010 11:13 PM, Geico Caveman wrote: >> On 2010-04-07 04:24:40 -0700, Jason Alexander<jalex(a)lse.ac.uk> said: >> >>> A better solution would be the following: create a text cell and enter >>> something like "Previously we calculated the value of X1 to be ", then >>> insert an inline cell (ctrl+9, I believe). In the inline cell, enter >>> "Dynamic[X1]", select and evaluate in place. >>> >>> The inline cell, although it appears inside of a text cell, will >>> automatically update to reflect the current value of X1. The previous >>> solution only captures the value of X1 at the time of evaluation. >>> >>> Jason >> >> That is what I ultimately did. Thanks. >> > -- Murray Eisenberg murray(a)math.umass.edu Mathematics & Statistics Dept. Lederle Graduate Research Tower phone 413 549-1020 (H) University of Massachusetts 413 545-2859 (W) 710 North Pleasant Street fax 413 545-1801 Amherst, MA 01003-9305
From: David Reiss on 17 Apr 2010 06:05 On Apr 16, 5:49 am, Murray Eisenberg <mur...(a)math.umass.edu> wrote: > I cannot get this to work: I created two new Input cells: > > Dynamic[x] > x = 5 > > Then I created a Text cell: > > the value is as you can see > > and into it, between "is " and " as" pasted the Dynamic[x] expression > copied from the first of the two Input cells -- even using Ctrl-( to > create explicitly an Inline cell there. > > Still, selecting that pasted expression and using the menu item > Evaluation > Evaluate in place seems to do nothing. > > What am I doing wrong? > > Also, if somehow this can be made to work, would the value of Dynamic[x] > in the Inline cell then automatically update when the value of x > changes? (My understanding of Dynamic tells me it should.) > > On 4/14/2010 11:13 PM, Geico Caveman wrote: > > > On 2010-04-07 04:24:40 -0700, Jason Alexander<ja...(a)lse.ac.uk> said: > > >> A better solution would be the following: create a text cell and enter > >> something like "Previously we calculated the value of X1 to be ", then > >> insert an inline cell (ctrl+9, I believe). In the inline cell, enter > >> "Dynamic[X1]", select and evaluate in place. > > >> The inline cell, although it appears inside of a text cell, will > >> automatically update to reflect the current value of X1. The previous > >> solution only captures the value of X1 at the time of evaluation. > > >> Jason > > > That is what I ultimately did. Thanks. > > -- > Murray Eisenberg mur...(a)math.umas= s.edu > Mathematics & Statistics Dept. > Lederle Graduate Research Tower phone 413 549-1020 (H) > University of Massachusetts 413 545-2859 (= W) > 710 North Pleasant Street fax 413 545-1801 > Amherst, MA 01003-9305 CellPrint[TextCell[Row[{"The value of x is ", Dynamic[x]}], "Text"]] then evaluate x=9 Is this what you were trying to accomplish? --david
First
|
Prev
|
Pages: 1 2 3 Prev: Orientation of Arrowheads Next: Solutions provided for "combining elements |