MathGroup Archive 2010

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

Search the Archive

Re: Automatic update of variables


On Jun 12, 4:31 am, Antonio De Ju=E1rez <adejua... at gmail.com> wrote:
> Sometimes, I would find useful a method to update variables
> automatically. For example, given the delayed rule
>
> b:=3 a+1;
>
> it would be useful to have b updated whenever a is assigned a new
> value, like a=37. Is there any method to do this in Mathematica?
>
> Thanks,
>
>    Antonio.

You could tell Mathematica to treat b as Dynamic:

Dynamic[b]

b := 3 a + 1;

Each time you change a, b now reflects the change.

a = 2

a = 3

-RG


  • Prev by Date: Re: Number to string headed by zeros
  • Next by Date: Re: corrupted notebook
  • Previous by thread: Re: Automatic update of variables
  • Next by thread: Re: Automatic update of variables