Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Do loop var in deferred assignment

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24334] Re: [mg24287] Do loop var in deferred assignment
  • From: BobHanlon at aol.com
  • Date: Sun, 9 Jul 2000 04:52:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

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