[Date Index]
[Thread Index]
[Author Index]
Re: newbie PolarPlot question
*To*: mathgroup at smc.vnet.net
*Subject*: [mg25058] Re: newbie PolarPlot question
*From*: "Allan Hayes" <hay at haystack.demon.co.uk>
*Date*: Thu, 7 Sep 2000 22:28:01 -0400 (EDT)
*References*: <8ov0jn$9p8@smc.vnet.net>
*Sender*: owner-wri-mathgroup at wolfram.com
Doug,
A good example from which to learn how Mathematica works..
Three ways out
1.
r[t] := 16/(5 + 3 Cos[t])
simply instructs Mathematica to replace r[t] 16/(5 + 3 Cos[t])
It will ignore r[s], r[3.3] etc.
So use
r[t_] := 16/(5 + 3 Cos[t])
which instructs Mathematica to replace r[a], for any a, with 16/(5 + 3 Cos[a]) (and
evaluate further if possible)
After making this change, you would still need to replace
PolarPlot[r, {t, 0, 2 Pi}]
with
PolarPlot[r[t], {t, 0, 2 Pi}]
Then, in the evaluation of this expression, r[s] is evaluated for sample
value of s in the range [0,2Pi]
2.
Use
r := 16/(5 + 3 Cos[t])
which tells Mathematica to replace occurences of r with 16/(5 + 3 Cos[t])
Then in the evaluation of
PolarPlot[r, {t, 0, 2 Pi}]
r will be evaluated with t set to succesive sample values.
With t = 1.3. we get
r ----> 16/(5 + 3 Cos[t]) ----> 16/(5 + 3 Cos[1.3]) -->2.75743
3
Use
PolarPlot[16/(5 + 3 Cos[t]), {t, 0, 2 Pi}]
With t = 1.3. we get
16/(5 + 3 Cos[t]) ----> 16/(5 + 3 Cos[1.3]) -->2.75743
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Doug Magnoli" <dmagnoli at home.com> wrote in message
news:8ov0jn$9p8 at smc.vnet.net...
> I've defined:
>
> r[t] := 16/(5 + 3 Cos[t])
>
> Then I load Graphics, with:
>
> <<Graphics`
>
> and ask for:
>
> PolarPlot[r, {t, 0, 2 Pi}], which tells me:
>
> ParametricPlot::pptr:
> {r Cos[t], r Sin[t]} does not evaluate to a pair
> of real numbers at t = 2.617993877991494`*^-7
>
> ParametricPlot::pptr:
> {r Cos[t], r Sin[t]} does not evaluate to a pair
> of real numbers at t = 0.25488992540742256`.
>
> ParametricPlot::pptr:
> {r Cos[t], r Sin[t]} does not evaluate to a pair
> of real numbers at t = 0.5328694051959509`.
>
> General::stop:
> Further output of ParametricPlot ::pptr will be
> suppressed during this calculation.
>
> Near as I can make out, x and y should both evaluate to real numbers for
> any value of theta between 0 and 2 Pi, so I don't know what I'm doing
> wrong.
>
> ....and, BTW, how do you get all those quotes from mathematica pages into
> this newsgroup without having to edit? I tried to copy, e.g.,
>
> In[32]:= PolarPlot[4, {t, 0, 2 Pi}]
>
> and I don't get the In[32]:= part. Also, when copying those error
> messages, I had to edit extensively, or else they look like this when
> copied / pasted:
>
> ParametricPlot::"pptr": "\!\({\(\(r\\ \(\(Cos[t]\)\)\)\), \(\(r\\ \
> \(\(Sin[t]\)\)\)\)}\) does not evaluate to a pair of real numbers at
> \!\(t\) \
> = \!\(2.617993877991494`*^-7\)."
>
> tia,
>
> -Doug Magnoli
>
>
>
>
>
>
>
Prev by Date:
**Add the Logarithms (error in integral)**
Next by Date:
**Re: newbie PolarPlot question**
Previous by thread:
**RE: newbie PolarPlot question**
Next by thread:
**Re: newbie PolarPlot question**
| |