MathGroup Archive 2000

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

Search the Archive

Re: Do loop var in deferred assignment


In a message dated 7/7/2000 12:43:51 AM, Tom.Aldenberg at rivm.nl writes:

>I am surprised to learn that in
>
>Do[degradation[i][t_]:=kdegrad[i]*concentration[i][t]
>  ,{i,10}]
>
>i in the rhs is not evaluated. Removing the colon works. However, I need
>delayed
>assignments for putting this in a dynamical system. How can I define:
>
>degradation[1][t_]:=kdegrad[1]*concentration[1][t],
>degradation[2][t_]:=kdegrad[2]*concentration[2][t], etc.?

Do[degradation[i][t_] := Evaluate[kdegrad[i]*concentration[i][t]], {i, 10}]


Bob Hanlon


  • Prev by Date: Re: l'Hopital's Rule
  • Next by Date: Re: combining graphics
  • Previous by thread: FW: Do loop var in deferred assignment
  • Next by thread: Re: Do loop var in deferred assignment