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

MathGroup Archive 2009

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

Search the Archive

Re: Output from a Dynamic Module

  • To: mathgroup at smc.vnet.net
  • Subject: [mg97765] Re: Output from a Dynamic Module
  • From: Yves Klett <yves.klett at googlemail.com>
  • Date: Sat, 21 Mar 2009 05:15:40 -0500 (EST)
  • References: <gpvhaj$gsm$1@smc.vnet.net>

Hugh,

perhaps something like:

DynamicModule[{pts}, pts = {{0, 0}, {1, 0}, {2, 0}, {3, 0}};
 Column[{Button["Assign points",
    CellPrint[ExpressionCell[pts, "Input"]]],
   LocatorPane[Dynamic[pts],
    Dynamic[Plot[Interpolation[pts][x], {x, 0, 3}, Frame -> True,
      Axes -> False, PlotRange -> {All, {-1, 1}},
      ImageSize -> 7 72]]]}]]

could help?

Regards,
Yves


Hugh Goyder schrieb:
> In the toy example below I have a dynamic module where I adjust
> Locator points to form a curve. When I have got a  nice set of points
> I would like to output them so that they can be used in other
> calculations. I have provided a button to do this but can't see the
> best way forward. Normally the output from a module is the last line
> but here this is not possible. I give a bad method by using a
> temporary file but what other methods are there? (And why does the
> temporary file I import get up-dated even when I don't press the
> button?)
> Thanks
> Hugh Goyder
> 
> DynamicModule[{pts},
>  pts = {{0, 0}, {1, 0}, {2, 0}, {3, 0}};
>  Column[{
>    Button["Assign points", Export["temp", Dynamic[pts], "List"]],
>    LocatorPane[Dynamic[pts],
>     Dynamic[
>      Plot[Interpolation[pts][x], {x, 0, 3}, Frame -> True,
>       Axes -> False, PlotRange -> {All, {-1, 1}}, ImageSize -> 7 72]]
>     ]
>    }]
>  ]
> 
> pp = Import["temp"]
> 


  • Prev by Date: utterly confused by Lightweight Grid
  • Next by Date: Re: Output from a Dynamic Module
  • Previous by thread: Output from a Dynamic Module
  • Next by thread: Re: Output from a Dynamic Module