MathGroup Archive 2009

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

Search the Archive

Re: Beginning syntax problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104610] Re: [mg104538] Beginning syntax problems
  • From: Larry Adelston <larrya at wolfram.com>
  • Date: Wed, 4 Nov 2009 01:42:16 -0500 (EST)
  • References: <200911030755.CAA01540@smc.vnet.net>

Hi Michael,

I am able to help you with the table formatting. I am not able to  
determine why the right column, in particular, your "b" value is not  
updating. But the following should help the formatting anyway.

Grid[{{Manipulate[
     Graphics[{{Dotted, Line[{{1, 0}, {1, m + b}}]}, {Dotted,
        Line[{{0, m + b}, {1, m + b}}]},
       Annotation[Line[t = {Table[{x, m*x + b}, {x, -5, 5}]}], "Line",
        "Mouse"]}, Axes -> True, AxesLabel -> {x, "y=mx+b"},
      PlotRange -> {{-5, 5}, {-5, 5}}], {b, 2, -2, -.5, ControlType ->  
None},
     Row[{"m",
       Manipulator[Dynamic[m], {2, -2, -.5}, Appearance -> "Labeled",
        ImageSize -> Small], "b",
       Manipulator[Dynamic[b], {2, -2, -.5}, Appearance -> "Labeled",
        ImageSize -> Small]}]],
    Grid[Prepend[
      Table[{x, Dynamic[m]*x + 2}, {x, -5, 5}], {Style["x", Bold],
       Style["y", Bold]}], Frame -> {All, False}]}}]


On Nov 3, 2009, at 1:55 AM, Michael Greene wrote:

> Grid[{{Manipulate[
>    Graphics[{{Dotted, Line[{{1, 0}, {1, m + b}}]}, {Dotted,
>       Line[{{0, m + b}, {1, m + b}}]},
>      Annotation[Line[t = {Table[{x, m*x + b}, {x, -5, 5}]}], "Line",
>       "Mouse"]
>      }, Axes -> True, AxesLabel -> {x, "y=mx+b"},
>     PlotRange -> {{-5, 5}, {-5, 5}}], {b, 2, -2, -.5,
>     ControlType -> None},
>    Row[{"m",
>      Manipulator[Dynamic[m], {2, -2, -.5}, Appearance -> "Labeled",
>       ImageSize -> Small], "b",
>      Manipulator[Dynamic[b], {2, -2, -.5}, Appearance -> "Labeled",
>       ImageSize -> Small]}]],
>   Grid[{"x", "y",
>     Grid[Table[{x,  Dynamic[m]*x + 2}, {x, -5, 5}],
>      Frame -> {All, False}]}]}}]



  • Prev by Date: Re: Re: Wrong Simplify[] Answer for
  • Next by Date: Re: Conventional way of doing "struct"-like things?
  • Previous by thread: Beginning syntax problems
  • Next by thread: Re: Beginning syntax problems