How do I separate the solutions to these coupled DEs in the plot?
I want to plot the solutions to these equations at time t=7
as a function of parameter a
while manipulating parameter b
.
Code:
Manipulate[
sol = ParametricNDSolveValue[
{s'[t] == -a*b*d[t], d'[t] == +b*s[t], s[0] == 100, d[0] == 0},
{s[7], d[7]},
{t, 0, 20},
{a}
];
Show[{
Plot[sol[a], {a, 0.1, 10}, ImageSize -> 400,
PlotStyle -> {Black, Blue}, PlotLabel -> populations]
}],
Text["Test-----"],
{{b, 1, "b"}, 0.1, 10, Appearance -> "Open"}
]
I tried
Plot[Evaluate@Table[(s[t],d[t])/.sol[a]],{a,0.1,10}]
and
Plot[Evaluate@Table[(s[a][t],d[a][t])/.sol],{a,0.1,10}]
and various other lines but Mathematica is giving me errors like "is neither a list of replacement rules nor a valid dispatch table, and so cannot be used for replacing"