Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'am trying to plot Poincare section for a 4-dimentional system of Delay differential equations. I don't know how to specify initial conditions. Can I use each of the code in the following ? Also how can I plot map in 3D? First code:

    system={v'[t]== -v[t]^3+0.55* v[t]- w[t]+ 1.3* Tanh[y[t-4]],v[t /; t <= 0]==0.3,w'[t] == v[t] - 1.128*w[t],w[t /; t <= 0]==0.6,
y' [t]== -y[t]^3+0.55* y[t]- z[t]+ 1.3 *Tanh[v[t-4]],y[t /; t <= 0]==0.5,z'[t] == y[t] - 0.58* z[t],z[t /; t <= 0]==0.7};vars={v[t],w[t],y[t],z[t]};
data = 
Reap[
sol = First[NDSolve[system,vars,{t,0,400},
Method->{"EventLocator",
"Event":> v[t],
"EventAction":>Sow[{y[t],z[t]}]},  MaxSteps -> \[Infinity]]][[-1, 1]]]

systemdata = Map[psect, {{0.3, 0.6, 0.5, 0.1},{0,0.1,0.2,0.3} 
                     }];

ListPlot[abcdata, ImageSize -> Medium]

The second code:

abc = {v'[t]== -v[t]^3+0.55* v[t]- w[t]+ 1.3* Tanh[y[t-4]],w'[t] == v[t] - 1.128*w[t],y' [t]== -y[t]^3+0.55* y[t]- z[t]+ 1.3 *Tanh[v[t-4]],z'[t] == y[t] - 0.58* z[t]};
psect[{v0_, w0_, y0_,z0_}] := 
 Reap[NDSolve[{abc, v[t /; t <= 0]==0,w[t /; t <= 0]==0.6, y[t /; t <= 0]==0.5,z[t /; t <= 0]==0.7, 
     WhenEvent[v[t] == 0, Sow[{ y[t],z[t]}]]}, {}, {t, 0, 500}, 
    MaxSteps -> \[Infinity]]][[-1, 1]]
abcdata = Map[psect, {{0.3, 0.6, 0.5, 0.1},{0,0.1,0.2,0.3} 
                     }];

ListPlot[abcdata, ImageSize -> Medium]
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.