Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

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.
> 


  • Prev by Date: Re: Displaying graphics with the MathKernel in OS X
  • Next by Date: Re: Help on drawing intervals
  • Previous by thread: Re: NDSolve with functions of vectors
  • Next by thread: Re: Re: NDSolve with functions of vectors