Plot to Plot3D problem

• To: mathgroup at smc.vnet.net
• Subject: [mg83373] Plot to Plot3D problem
• From: Jerry <JLK2941 at yahoo.com>
• Date: Sun, 18 Nov 2007 04:56:22 -0500 (EST)

```Greetings all. Could someone please give me a tip on what
I'm doing wrong when trying to convert a working Plot
routine to a Plot3D routine?

I'm using V6.01 on XP.

The first code set below works fine, using a fixed value for
the parameter Rf.

In the second code set, I don't set parameter Rf and I try
to use it as one variable in Plot3D. I've tried every
combination of set or set delayed for eqs and sol and tried
inserting Evaluate all over the place and haven't hit
goodness yet. Clearly I'm not ready for prime time on my own.

Would appreciate any suggestions.

(* this works *)
a = 1.0; w = 1.57;
Rf = 1*10^6;
R = 1000; c = 2*10^-6;

v2[t_] := Exp[-a t^2] Sin[w t];
v3[t_] := v2'[t];

eqs = {vo'[t] == -(v3[t]/R/c + vo[t]/Rf/c), vo[-5] == 0};

sol = NDSolve[{eqs}, vo, {t, -10, 5}]

Plot[ Evaluate[ vo[t] /. sol], {t, -5, 5} ]

**********************

(* this doesn't work *)
a = 1.0; w = 1.57;
(* parameter Rf specified in Plot3D below *)
R = 1000; c = 2*10^-6;

v2[t_] := Exp[-a t^2] Sin[w t];
v3[t_] := v2'[t];

eqs = {vo'[t] == -(v3[t]/R/c + vo[t]/Rf/c), vo[-5] == 0};

sol[Rf_] := NDSolve[{eqs}, vo, {t, -10, 5}]

Plot3D[ Evaluate[ vo[t] /. sol[Rf] ], {t, -5, 5},
{Rf, 1*^6,5*^6} ]

```

• Prev by Date: Mathematica question : Stepsize control
• Next by Date: Re: What is a good way of returning a function from a Module[]?
• Previous by thread: Re: Mathematica question : Stepsize control
• Next by thread: Re: Plot to Plot3D problem