Plotting solution as a function of a specific parameter

I am trying to plot the solutions of the following system as a function of a parameter \[Gamma]. The working code is

\[Omega] = -2;
Manipulate[
sol = First[
NDSolve[{x'[t] == \[Omega]*x[t] - \[Gamma]*x[t]^2 - \[Alpha]*y[t],
x[t /; t <= 0] == 1,
y'[t] == \[Omega]*y[t] - \[Gamma]*y[t]^2 - \[Alpha]*x[t],
y[t /; t <= 0] == 0}, {x, y}, {t, 0, 10}]];

Plot[Evaluate[Re@{x[t], y[t]} /. sol], {t, 0, 200}, PlotRange -> {{0, 100}, {-100, 100}},
PlotStyle -> {Thick}, Frame -> True], {{\[Gamma], 0.1}, 1,
10}, {{\[Alpha], 0.1}, 1, 10}]

I have tried with Table but the output gives errors. I want to plot $x$, $y$ as functions of [Gamma], i.e., [Gamma] on the x-axis.

• you say you want gamma on x axis, but your plot command uses t for the x axis. but general advice: before throwing everything into Manipulate, first make sure it works outside Manipulate. i.e. see if the plot works, etc.., only then, move things to Manipulate. Jul 13 '18 at 3:40
– AtoZ
Jul 13 '18 at 6:20

\[Omega] = -2;
Manipulate[
X = ParametricNDSolveValue[{x'[
t] == \[Omega]*x[t] - \[Gamma]*x[t]^2 - \[Alpha]*y[t],
x == 1,
y'[t] == \[Omega]*y[t] - \[Gamma]*y[t]^2 - \[Alpha]*x[t],
y == 0}, x, {t, 0, 10}, {\[Gamma]}];
Y = ParametricNDSolveValue[{x'[
t] == \[Omega]*x[t] - \[Gamma]*x[t]^2 - \[Alpha]*y[t],
x == 1,
y'[t] == \[Omega]*y[t] - \[Gamma]*y[t]^2 - \[Alpha]*x[t],
y == 0}, y, {t, 0, 10}, {\[Gamma]}];
Plot[{Re[X[\[Gamma]][t0]], Re[Y[\[Gamma]][t0]]}, {\[Gamma], 1, 10},
PlotRange -> All, PlotStyle -> {Thick}, Frame -> True,
FrameLabel -> {"\[Gamma]", ""}], {{t0, 5}, 1,
10}, {{\[Alpha], 0.5}, .1, 1}] • Thanks. The first manipulator $t0$ is time?
– AtoZ
Jul 13 '18 at 6:18
• Yes, t0 is time. Jul 13 '18 at 6:21