[Date Index]
[Thread Index]
[Author Index]
Re: Plot and evaluate help
*To*: mathgroup at smc.vnet.net
*Subject*: [mg7874] Re: [mg7839] Plot and evaluate help
*From*: "Eric P. Nichols" <raoul at montana.campus.mci.net>
*Date*: Thu, 17 Jul 1997 15:35:38 -0400
*Sender*: owner-wri-mathgroup at wolfram.com
> I am a novice mathematica user having difficulty plotting a
> simple
> function. I am trying to plot the functions f[x_] = c1 / (c1 + c2)
> and f'[x_]
> over an arbitrary range for c1 and c2. The Plot syntax specifies
> Plot[f, {x,
> min, max}]. I hate to ask such a basic question, but how does one
> plot a
> function of more than one variable?
Alan,
The function you need is Plot3D, the syntax is:
Plot3D[f, {x, xmin, xmax}, {y, ymin, ymax}]
In your case, then, you could write:
f = c1 / (c1 + c2)
Plot3D[f, {c1, -5, 5}, {c2, -5, 5}]
There are two different partial derivatives, given by
f1 = D[f, c2]
f2 = D[f, c2]
then you can Plot3D f1 and f2 as well.
If you want to use f, f1, and f2 in different ways, you may want to
define a function,
f[c1_, c2_] := c1 /(c1 + c2)
Then you can type f[1,1] and get the response 0.5, for example, or do
the plots like:
Plot3D[f[c1, c2], {c1, -5, 5}, {c2, -5, 5}]
notice now you need to say f[c1, c2], not just f.
Hope this helps,
Eric
--------------8CC25950981C632CB88A1086
Content-Description: Card for Eric Nichols
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Eric Nichols
n: Nichols;Eric
email;internet: raoul at montana.campus.mci.net
x-mozilla-cpt: ;0
x-mozilla-html: TRUE
end: vcard
--------------8CC25950981C632CB88A1086--
Prev by Date:
**Re: Sinusoidal Nonlinear Fit**
Next by Date:
**What's up with Input?**
Previous by thread:
**Re: Sinusoidal Nonlinear Fit**
Next by thread:
**Re: Plot and evaluate help**
| |