Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ClearAll["Global`*"]
  2. Remove["Global`*"]
  3.  
  4. {ysol, xsol} = ParametricNDSolve[{x'[t] == x[t] + g*x[t]*y[t],
  5. y'[t] == 1 - 2*x[t]^2 - g*y[t]^2, x[1] == 1, y[1] == 1}, {y, x}, {t, 0, 10}, {g}];
  6.  
  7. ParametricPlot[Evaluate@Table[{y[g][t] /. ysol, x[g][t] /. xsol}, {g, 0, 1,
  8. 1/4}], {t, 0, 2}, PlotRange -> {{-3, 3}, {-3, 3}},
  9. PlotLegends -> {"g=1/4", "g=2/4", "g=4/4", "g=4/4"}] // Quiet
  10.  
  11. g=3.5
  12. y[g][t] /. ysol
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement