Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

machine size real numbers?

1,560 views
Skip to first unread message

Rick Dyer

unread,
Aug 1, 2002, 4:55:23 AM8/1/02
to
In[1]:=
x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)

In[2]:=
Plot[x, {t, 0, 8000*Pi}]

Plot::"plnr": x is not a machine-size real number at t =
0.0010471975511965976

Plot::"plnr": x is not a machine-size real number at t =
1019.5597016296903

Plot::"plnr": x is not a machine-size real number at t =
2131.4776207838036

General::"stop": Further output of Plot :: "plnr" will be suppressed
during this calculation

I am trying to plot the function x(t) defined above, same thing
happens when i try to plot other similar functions always get an error
saying that the machine size number is nor real, I have tried to find
an answer in this message group, as well as the mathematica help
online and built in, if someone knows what is going on please help me.

My computer is an AMD 1Gig with 256MG of ram, if that is of
consequence. Windows XP pro

Any help would be appreciated

Thanks Rick

Florian Jaccard

unread,
Aug 2, 2002, 2:38:12 AM8/2/02
to
Hello Rick !

You have to use [ ] , not ( ) , for the argument of the function. And you
have to tell him to draw x[t], not just x...

In[1]:=
x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]

In[2]:=
Plot[x[t], {t, 0, 8000*Pi}]

works...

But 8000*Pi is a bit to much... You should draw until Pi/2000.
Much more interesting !

Meilleures salutations

Florian Jaccard
professeur de Mathématiques
EICN-HES
e-mail : jacc...@eicn.ch


-----Message d'origine-----
De : Rick Dyer [mailto:rkd...@cecs.pdx.edu]
Envoyé : jeu., 1. août 2002 10:35
À : math...@smc.vnet.net
Objet : machine size real numbers?

jmt

unread,
Aug 2, 2002, 2:39:14 AM8/2/02
to
x := 1 + Cos[2000 Pi t] + Sin[2000 Pi t]

Plot[x, {t, 0, 8000 Pi}]

works fine for me.


Notes :
- use [ and ] for functions ;
- x and x[t] are different !

Ingolf Dahl

unread,
Aug 2, 2002, 2:41:17 AM8/2/02
to
This works:

x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]
(with square brackets for function arguments)
followed by

Plot[x[t], {t, 0, 8000*Pi}]
(with the function argument specified).
The plot looks like white noise, but do not blame Mathematica for that! If
you change the options for Plot, you surely could produce a printout that
tests the blackness of your printer toner :)
Use
Plot[x[t], {t, 0, 0.002}]
instead. Then you will see 2 periods of your function.

Ingolf Dahl
Chalmers University
Sweden


-----Original Message-----
From: Rick Dyer [mailto:rkd...@cecs.pdx.edu]
Subject: machine size real numbers?


In[1]:=


x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)

In[2]:=
Plot[x, {t, 0, 8000*Pi}]

Plot::"plnr": x is not a machine-size real number at t =

BobH...@aol.com

unread,
Aug 2, 2002, 2:42:18 AM8/2/02
to

In a message dated 8/1/02 6:11:25 AM, rkd...@cecs.pdx.edu writes:

>In[1]:=
>x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)
>
>In[2]:=
>Plot[x, {t, 0, 8000*Pi}]
>
>Plot::"plnr": x is not a machine-size real number at t =
>0.0010471975511965976
>
>Plot::"plnr": x is not a machine-size real number at t =
>1019.5597016296903
>
>Plot::"plnr": x is not a machine-size real number at t =
>2131.4776207838036
>
>General::"stop": Further output of Plot :: "plnr" will be suppressed
>during this calculation
>
>I am trying to plot the function x(t) defined above, same thing
>happens when i try to plot other similar functions always get an error
>saying that the machine size number is nor real, I have tried to find
>an answer in this message group, as well as the mathematica help
>online and built in, if someone knows what is going on please help me.
>
>My computer is an AMD 1Gig with 256MG of ram, if that is of
>consequence. Windows XP pro

x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t];


Plot[x[t], {t, 0, 8000*Pi}];

Although for this many cycles you need to increase the PlotPoints to get an
accurate Plot at which point it would be quicker to draw a filled rectangle.


Bob Hanlon
Chantilly, VA USA

Y.A.Tesiram

unread,
Aug 2, 2002, 2:43:20 AM8/2/02
to
Hi Rick,

Square brackets around the Sin and Cos or indeed around any other
function (e.g. Tan[x], ArcSin[2.0*t], f[x])

e.g. x[t_]:= 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]

and vvv


Plot[x[t], {t, 0, 8000*Pi}]

^^^

Yas


On Thu, 1 Aug 2002, Rick Dyer wrote:

> In[1]:=
> x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)
>
> In[2]:=
> Plot[x, {t, 0, 8000*Pi}]
>
> Plot::"plnr": x is not a machine-size real number at t =
> 0.0010471975511965976
>
> Plot::"plnr": x is not a machine-size real number at t =
> 1019.5597016296903
>
> Plot::"plnr": x is not a machine-size real number at t =
> 2131.4776207838036
>
> General::"stop": Further output of Plot :: "plnr" will be suppressed
> during this calculation
>
> I am trying to plot the function x(t) defined above, same thing
> happens when i try to plot other similar functions always get an error
> saying that the machine size number is nor real, I have tried to find
> an answer in this message group, as well as the mathematica help
> online and built in, if someone knows what is going on please help me.
>
> My computer is an AMD 1Gig with 256MG of ram, if that is of
> consequence. Windows XP pro
>

David Park

unread,
Aug 2, 2002, 2:46:27 AM8/2/02
to
Rick,

You should consider working through as much of Part I of The Mathematica
Book as you can to become familiar with Mathematica syntax.

In Mathematica the function arguments are always enclosed in square
brackets, not parentheses.

x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]

In your plot statement you must plot x[t] and not just x. The following will
plot, but I don't think it is what you intended.

Plot[x[t], {t, 0, 8000*Pi}];

You probably want something more like...

Plot[x[t], {t, 0, Pi/1000}];

David Park
dj...@earthlink.net
http://home.earthlink.net/~djmp/


From: Rick Dyer [mailto:rkd...@cecs.pdx.edu]

Marek Twardochlib

unread,
Aug 2, 2002, 2:50:38 AM8/2/02
to
Rick Dyer wrote:
>
> In[1]:=
> x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)

x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]


marek

DrBob

unread,
Aug 2, 2002, 2:52:42 AM8/2/02
to
x isn't a number; it's a function. x[t] is a number.

Bobby

-----Original Message-----
From: Rick Dyer [mailto:rkd...@cecs.pdx.edu]

Subject: machine size real numbers?

In[1]:=
x[t_] := 1 + Cos(2000*Pi*t) + Sin(4000*Pi*t)

In[2]:=

Allan Hayes

unread,
Aug 2, 2002, 2:59:58 AM8/2/02
to
Rick,
You need square brackets not round ones - standard Mathematica syntax with
functions:

x[t_] := 1 + Cos[2000*Pi*t] + Sin[4000*Pi*t]

This can be tracked down by evaluating

x[0.0010471975511965976]

--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
h...@haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


"Rick Dyer" <rkd...@cecs.pdx.edu> wrote in message
news:aiat9q$5ba$1...@smc.vnet.net...

0 new messages