MathGroup Archive 2010

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

Search the Archive

Re: manipulate plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107400] Re: [mg107378] manipulate plot
  • From: bsyehuda at gmail.com
  • Date: Thu, 11 Feb 2010 07:57:39 -0500 (EST)
  • References: <201002111018.FAA28056@smc.vnet.net>

Its seems that you have to read more about scoping (in general and in
Mathematica).
Manipulate automatically generates a DynamicModule which is a scoping
environment.
Take a simpler example

y = m x; (*here m and x are GLOBAL VARIABLES *)

Module[{x =1, m=2},y](*here m and x are local variables having different
names*)
returns
m x
and not the value 2 since the (local) variables of the Module has different
names than x and m

Block is different

Block[{x =1, m=2},y]*here m and x are local variables having identical names
and the global values are stored in the stack*)
returns 2
and m and x are unchanged after the program terminates

Since Manipulate uses DynamicModule (which, for scoping is identical) you
cannot do it this way.

yehuda



  • References:
  • Prev by Date: Re: Rotating graphics problem
  • Next by Date: Re: Re: ReplaceAll reloaded
  • Previous by thread: manipulate plot
  • Next by thread: Re: manipulate plot