Prev: Define an antisymmetric function
Next: How to lay out a grid of plots with frame labels, but no spaces
From: bsyehuda on 11 Feb 2010 07:57 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
From: you can call me al on 18 Feb 2010 05:17
Many thanks Carl, I think this is what I was looking for! |