Message Boards Message Boards

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

Question about getting a table of NDSolve solutions

So I have a system of ODEs that I am solving through NDSolve, and I can plot them in mathematica, but I am curious how to get the x and y values used in the plotsfor manipulation in programs like excel. Here is the code I am currently working with. Clear["Global'*"]; ka = .004; kd = 1.2; km = 1500; ns = 25; sens = 1; ro2 = 11; odecella = ka nut[t] cella[t] - (kd cella[t])/(1 + (nut[t]/ns)^sens); odecelld = (kd cella[t])/(1 + (nut[t]/ns)^sens); odeo2 = ro2 (1256 - o2[t]) - km cella[t]; odenut = -ka nut[t] cella[t]; vars = {cella[t], celld[t], o2[t], nut[t]}; solution = NDSolve[{Derivative[1][cella][t] == odecella, Derivative[1][celld][t] == odecelld, Derivative[1][o2][t] == odeo2, Derivative[1][nut][t] == odenut, cella[0] == .01, celld[0] == 0, o2[0] == 1110, nut[0] == 100}, vars, {t, 0, 120}]; vars; Plot[cella[t] /. solution, {t, 0, 120}, PlotRange -> Full] Plot[celld[t] /. solution, {t, 0, 120}, PlotRange -> Full] Plot[o2[t] /. solution, {t, 0, 120}, PlotRange -> Full] Plot[nut[t] /. solution, {t, 0, 120}, PlotRange -> Full]

POSTED BY: Josh Wofford

You can get the points on which the interpolation is based using Reap and Sow, with EvaluationMonitor :> Sow[ variable[t]]

POSTED BY: Frank Kampas
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