Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- B = -2; A = 1;
- s = ParametricNDSolveValue[{Sqrt[-1]*x'[t] ==
- B*x[t] - R*x[t]*Abs[x[t]]^2 - A*y[t], x[0] == 1,
- Sqrt[-1]*y'[t] == B*y[t] - R*y[t]*Abs[y[t]]^2 - A*x[t],
- y[0] == 0}, {x, y}, {t, 0, 100}, {R}];
- coll = {};
- Table[pp =
- ParametricPlot[Re@Through[s[a][t]], {t, 0, 100},
- PlotRange -> {{-2, 2}, {-2, 2}}, PerformanceGoal -> "Quality",
- MeshFunctions -> (#2 &), Mesh -> {{0.}},
- MeshStyle -> {Red, PointSize[0.01]}];
- pts = pp[[1, 1]];
- AppendTo[
- coll, {a, #[[1]]} & /@
- pts[[First@Cases[pp[[1]], Point[x__] :> x, -1]]]];, {a, 0.0, 5,
- 0.01}];
- lp = ListPlot[Join @@ coll, Frame -> True, PlotStyle -> Red];
- Manipulate[
- Column[{ParametricPlot[Re@Through[s[par][t]], {t, 0, 100},
- PlotRange -> {{-2, 2}, {-2, 2}}, PerformanceGoal -> "Quality",
- MeshFunctions -> (#2 &), Mesh -> {{0.}},
- MeshStyle -> {Red, PointSize[0.01]}, Frame -> True,
- FrameLabel -> {"x[t]", "y[t]"}],
- Show[lp, Graphics[{Gray, Line[{{par, 0}, {par, 4}}]}]]}], {par,
- 0.0, 5, 0.01}]
- coll = {};
- Table[pp =
- ParametricPlot[Re@Through[s[a][b][t]], {t, 0, 20},
- PlotRange -> {{-2, 2}, {-2, 2}}, PerformanceGoal -> "Quality",
- MeshFunctions -> (#2 &), Mesh -> {{0.}},
- MeshStyle -> {Red, PointSize[0.01]}];
- pts = pp[[1, 1]];
- AppendTo[
- coll, {a, b, #[[1]]} & /@
- pts[[First@Cases[pp[[1]], Point[x__] :> x, -1]]]];, {a, 0.0, 5,
- 0.01}, {b, 0.0, 5, 0.01}];
- lp = ListPlot[Join @@ coll, Frame -> True, PlotStyle -> Red];
- Manipulate[
- Column[{ParametricPlot[Re@Through[s[par1][par2][t]], {t, 0, 20},
- PlotRange -> {{-2, 2}, {-2, 2}}, PerformanceGoal -> "Quality",
- MeshFunctions -> (#2 &), Mesh -> {{0.}},
- MeshStyle -> {Red, PointSize[0.01]}, Frame -> True,
- FrameLabel -> {"x[t]", "y[t]"}],
- Show[lp,
- Graphics[{Gray,
- Line[{{par1, 0}, {par1, 4}, {par2, 0}, {par2, 4}}]}]]}], {par1,
- 0.0, 5, 0.01}, {par2, 0.0, 5, 0.01}]
Add Comment
Please, Sign In to add comment