MathGroup Archive 1999

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

Search the Archive

Array of Coupled DE

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16695] Array of Coupled DE
  • From: Guy Gilliland <guy20 at wharton.upenn.edu>
  • Date: Sat, 20 Mar 1999 02:09:04 -0500
  • Organization: Wharton
  • Sender: owner-wri-mathgroup at wolfram.com

I have the following code to solve an array of coupled diff. eqs..  The
set of coupled eqs. are solved for 3 different initial conditions.  I
then want to combine the results for x[t], y[t], and z[t] for each set
of initial conditions by appending each subsequent solution to the same
list 
i.e. - xx[t] = {x[1][t],x[2][t],x[3][t]}  or something like this
Then I do the parametric plotting.
Here is the code I have (which does not work)

x0={0.4,-1.9,-0.2};y0={1.2,2.4,-1.8}
pp=Table[ssoln=NDSolve[x'[i][t]==y[i][t],x[i][0]==x0[[i]],
              
y'[i][t]==-0.5y[i][t]-Sin[x[i][t]]+1.3Cos[z[i][t],y[i][0]==y0[[i]],
               z'[i][t]==w,z[i][0]==0},{x[i],y[i],z[i]},{t,0,400}];
        
xx{t_]=Flatten[x[i][t]];yy[t_]=Flatten[y[i][t]];zz[t_]=Flatten[z[i][t]];
        
ParametricPlot3D[Evaluate[{xx[t],yy[t],zz[t]}/.ssoln],{t,300,400}
        
PlotPoints->5000,AxesLabel->{"X","Y","Z"},DisplayFunction->Identity],
   {w,0.0,1.0,0.1},{i,1,3,1}];

I get an error (among many errors) saying that there are only 2 DEs and
3 initial conditions.
Can you tell me how to correct the above equations.
Thanks
Guy Gilliland
p.s. email me at:    guy20 at wharton.upenn.edu


  • Prev by Date: Integer Linear programming
  • Next by Date: 3D rotation for Orbit 3D
  • Previous by thread: Integer Linear programming
  • Next by thread: 3D rotation for Orbit 3D