I'm trying to use NDSolve inside manipulate. Specifically, I have a series of differential equations with coefficients, k1
, k2
, k3
, k11
, k22
, that I'd like to be able to vary. I am currently getting a blank plot. The code I am using is as follows:
Manipulate[
Plot[revised1[t_] =
NDSolve[{y1'[t] == -k1*y1[t]*y2[t] + k11*y3[t],
y2'[t] == -k1*y1[t]*y2[t] + k3*y5[t] + k11*y3[t],
y3'[t] ==
k1*y1[t]*y2[t] - k2*y3[t]*y4[t] + k22*y5[t] - k11*y3[t],
y4'[t] == -k2*y4[t]*y3[t] + k22*y5[t],
y5'[t] == k2*y3[t]*y4[t] - k22*y5[t] - k3*y5[t],
y6'[t] == k3*y5[t], y1[0] == 300, y2[0] == 1, y3[0] == 0,
y4[0] == 200, y5[0] == 0, y6[0] == 0}, {y1[t], y2[t], y3[t],
y4[t], y5[t], y6[t]}, {t, 0, 200}], {t, 0, 200}], {k1, 0,
100}, {k11, 0, 100}, {k2, 0, 100}, {k22, 0, 100}, {k3, 0, 100}]
What should I change in order to plot the solutions to the system of differential equations and be able to manipulate the k values?
Rule
s that need to be converted to regular expressions. You might consider usingParametricNDSolveValue
instead. $\endgroup$