Message Boards Message Boards

1 Reply
0 Total Likes
View groups...
Share this post:

Plotting the Solution of a Parametric Differential Equation

I have a parametric differential equation:

sol = ParametricNDSolve[{a.p[t]/(1 -b.p[t]) == c.p'[t], p'[0] == 0},p,{t, 0, 10}, {a,b,c}]

I'd like to plot solutions with different values of parameter a:

Plot[Evaluate[Table[sol[a, 1, 2][t], {a, 0, 1, 0.1}]], {t, 0, 100}]

But this (even with other values for the parameter and different ranges for t) just gives me two axes and nothing else! Is there another way to plot this?


POSTED BY: Hossein Hosseini

If you impose p'[0]==0 it seems that you get the constant zero solution for any value of the parameters. The dot in a.p[t] means multiplication? Beware that in Mathematica the dot has a different meaning. For multiplication you need *

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract