Message Boards Message Boards

Visualizing the graph inside a Manipulate

Posted 10 years ago

hi, I am not able to manipulate some plots, can someone please help in doing that, I am attaching the file for reference. I can see the graph with the slider, but I cannot see any change even if I change the slider position.

Thanks

Thanks, Jaydeep

Attachments:
POSTED BY: Jaydeep Yadav
4 Replies
Posted 10 years ago
POSTED BY: Bill Simpson
Posted 10 years ago
Attachments:
POSTED BY: Jaydeep Yadav
Posted 10 years ago

oops .... to many {km} at the end of model1. This is the correct version:

Model1 = ParametricNDSolve[{ Ca'[t] == ((Vmax Cb[t])/(Km + Cb[t]) - Pdiff Fuc Ca[t] + Pdiff Cb[t])/Va, Cb'[t] == (Pdiff Fuc Ca[t] - Pdiff Cb[t] - (Vmax Cb[t])/(Km + Cb[t]))/Vb, Ca[0] == 0, Cb[0] == Cb0 }, {Ca, Cb}, {t, 0, 100}, {Km}, PrecisionGoal -> Infinity]

POSTED BY: Luciano Iavelli
Posted 10 years ago

Hi Jaydeep

you ought to use ParametricNDSolve without defining in advance Km. So something like this for model1 (notice the parameters Km betwwen curly braces at the end) will work

Model1 = ParametricNDSolve[{ Ca'[t] == ((Vmax Cb[t])/(Km + Cb[t]) - Pdiff Fuc Ca[t] + Pdiff Cb[t])/Va, Cb'[t] == (Pdiff Fuc Ca[t] - Pdiff Cb[t] - (Vmax Cb[t])/(Km + Cb[t]))/Vb, Ca[0] == 0, Cb[0] == Cb0 }, {Ca, Cb}, {t, 0, 100}, {Km}, {Km}, PrecisionGoal -> Infinity]

Then to plot an actual solution vs a specific parameter value (here the first argument, 15, holds for the Km parameter):

Plot1 = Plot[Ca[15][t] /. Model1, {t, 0, 180}, PlotRange -> {{0, 45}, {0, 1000}}, PlotStyle -> Magenta]

A last this one will allow you to manipulate the solution of your model:

Manipulate[ Plot[Ca[Km][t] /. Model1, {t, 0, 180}, PlotRange -> {{0, 45}, {0, 1000}}], {Km, 0, 40}]

Hope this helps.

Luciano

POSTED BY: Luciano Iavelli
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract