Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Plot3D' topicStudent Support Forum > General > "Plot3D"

Next Comment >Help | Reply To Topic
Author Comment/Response
John
08/19/05 2:23pm

Hello,
I am trying to make a 3D plot with the Plot3D function. The function f[a_,b_] solves a system of differential equations. The function g[a_,b_] uses the solution to f[a_,b_]. I would like to make a 3D plot using the function g[a_,b_} with "a" taking on values from 0.1 to 1 and "b" taking on values from 0.1 to 1. Unfortunately I get error messages when I try to use the Plot3D function. Any tips would be appreciated. Here are my equations.

f[a_, b_] :=
NDSolve[{x'[t] == If[x[t] ≤ 0.0001,
0, -(b/3)*(1 -y[t])/x[t]],
y'[t] == If[x[t] ≤ 0.0001,
-2*10*y[t], a*b*x[t]*(1 - y[t]) - 2*10*y[t]],
x[0] == 1, y[0] == 0}, {x, y}, {t, 0, 1}, Method -> StiffnessSwitching]


g[a_, b_] :=
1 - (x[1] /. f[a, b])^3 - (y[1] /. f[a, b])/a

Plot3D[Evaluate[g[a, b]], {a, .1, 1}, {b, .1, 1}]

URL: ,

Subject (listing for 'Plot3D')
Author Date Posted
Plot3D John 08/19/05 2:23pm
Re: Plot3D yehuda ben-s... 08/24/05 1:54pm
Next Comment >Help | Reply To Topic