[Date Index] [Thread Index] [Author Index]
Re: Automatic update of variables
On 6/12/10 at 5:31 AM, adejuarez at gmail.com (Antonio De Ju=C3=A1rez) 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? Given: In:= b := 3 a + 1 In:= a = 3; b Out= 10 In:= a = 30; b Out= 91 It seems SetDelayed is doing precisely what you are requesting.