Re: How to define a localized indexed object in Manipulate?
- To: mathgroup at smc.vnet.net
- Subject: [mg123818] Re: How to define a localized indexed object in Manipulate?
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Wed, 21 Dec 2011 06:52:55 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jckcdj$1mc$1@smc.vnet.net> <jcn9tk$e1t$1@smc.vnet.net>
- Reply-to: nma at 12000.org
On 12/19/2011 6:15 AM, Armand Tamzarian wrote:
>
> You appear to be asking for the following:
>
> 1. keep all symbols local; and
>
> 2. have p[x] update incrementally when n changes; and
>
> 3. the solution must be a Manipulate.
>
> One possible solution that fits that criteria is this:
>
> Manipulate[
> DynamicModule[{p, x},
> p@x = 0;
>
> Column[{
> Dynamic[p@x += 1; n, TrackedSymbols :> {n}],
> Dynamic@Row[{"p@x=",p@x}]
> }],
>
> {{n, 0, "n"}, 0, 10, 1}]
>
>
> Mike
>
Thanks Mike, yes, your solution solves the problem I had.
--Nasser