Re: NDSolve with functions of vectors

*To*: mathgroup at smc.vnet.net*Subject*: [mg82905] Re: NDSolve with functions of vectors*From*: Jerry <JLK2941 at yahoo.com>*Date*: Sat, 3 Nov 2007 03:20:53 -0500 (EST)*References*: <fgca49$9ho$1@smc.vnet.net> <fgenik$fv6$1@smc.vnet.net>

Hi, I tried your code and got these errors. What did I miss? Thanks. Part::partw: Part 2 of x[s] does not exist. >> Part::partw: Part 3 of x[s] does not exist. >> Steve Luttrell wrote: > This does what you want: > > solution = > NDSolve[{x'[s] == {2*x[s][[2]], x[s][[1]]/3, x[s][[3]]}, > x[0] == {1, 1, 1}}, x[s], {s, 0, 1}] > > gives > > {{x[s]->InterpolatingFunction[{{0.,1.}},<>][s]}} > > Then > > ParametricPlot3D[Expand[x[s]/.solution[[1]]],{s,0,1}] > > gives a 3D plot of the trajectory for 0<=s<=1. >