MathGroup Archive 2009

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

Search the Archive

problem with replace all and functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98699] problem with replace all and functions
  • From: wiso <gtu2003 at alice.it>
  • Date: Thu, 16 Apr 2009 04:17:24 -0400 (EDT)

I've a lot of rules created by NDSolve:

{{Subscript[x, 1][t]->InterpolatingFunction[{{0.`,213.43887344465708`}}, 
"<>"][t],
Subscript[y, 1][t]->InterpolatingFunction[{{0.`,213.43887344465708`}}, "<>"]
[t],
Subscript[x, 2][t]->InterpolatingFunction[{{0.`,213.43887344465708`}}, "<>"]
[t],
Subscript[y, 2][t]->InterpolatingFunction[{{0.`,213.43887344465708`}}, "<>"]
[t],
...

}}

I have defined:

Subscript[punto, 1][t_]:= 
Evaluate[{Subscript[x, 1][t],Subscript[y, 1][t]}/.sol3[[1]]]

Subscript[punto, 2][t_]:=
Evaluate[{Subscript[x, 2][t],Subscript[y, 2][t]}/.sol3[[1]]]

Subscript[punto, 3][t_]:=
Evaluate[{Subscript[x, 3][t],Subscript[y, 3][t]}/.sol3[[1]]]


it works, but it's not very good, I've want something like this:

Subscript[punto, i_][t_]:=
Evaluate[{Subscript[x, i][t],Subscript[y, i][t]}/.sol3[[1]]]

but it doesn't work



  • Prev by Date: Re: Simplify
  • Next by Date: Re: Plotting a x,y,z function
  • Previous by thread: Re: Assuming odd/even functions
  • Next by thread: Re: problem with replace all and functions