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

MathGroup Archive 2008

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

Search the Archive

Re: Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg86240] Re: Manipulate
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 6 Mar 2008 03:02:51 -0500 (EST)
  • References: <fqlmn4$jcj$1@smc.vnet.net>

Hi,

you create an infinite loop, append in every cycle
a value to your list and wondering what goes wrong ?

Try

lst = {};
Manipulate[lst = Union[lst, {value}];
  Dynamic@ value, {value, 1, 10, 1}]

regards
   Jens


N K wrote:
> Hi,
> I just have started using Mathematica and was working on the Manipulate function.  I have the following piece of code:
> 
> 
> Manipulate[
>  Print[value],
>  {value, 1, 10, 1, ControlType -> Animator}
>  ]
> which seems to work just fine. However, if I add the following line to it, it does not quite work. 
> 
> 
> lst = {};
> Manipulate[
>  lst = Append[lst, value];
>  Print[value],
>   {value, 1, 10, 1, ControlType -> Animator}
>  ]
> 
> 
> The values that are being printed for "value" are really weird and incorrect. 
> Any suggestions on what I have done wrong? 
> 
> 
> Thanks very much,
> 
> 


  • Prev by Date: Re: v6: Input Cell Word Wrapping: how to set global default?
  • Next by Date: Writing a HoldAll function that evaluates its arguments
  • Previous by thread: Re: Manipulate
  • Next by thread: Re: Manipulate