       Re: Plot[] problem (plnr) - help !!!

• To: mathgroup at smc.vnet.net
• Subject: [mg15964] Re: Plot[] problem (plnr) - help !!!
• From: "Allan Hayes" <hay at haystack.demon.co.uk>
• Date: Fri, 19 Feb 1999 03:26:53 -0500
• References: <7ag3bt\$aj1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Alexander Sirotkin wrote in message <7ag3bt\$aj1 at smc.vnet.net>...
>Hi.
>
>I'm trying to do most trivial and simple thing - define
>some function and then Plot[] it. However, I get some very
>weird error - "  ...is not a machine-size real number at ..."
>
>Here is the code :
>a==1
>a==0.99/50000
>H[w] == 20Log[10,Sum[a[k] Exp[I 2Pi w(-k)], {k,0,1}]]
>Clear[H]
>Plot[H[w], {w, 1, 100}]
>
>I've seen some articles (even at www.wolfram.com) about that
>problem, but NONE of them proposed a working solution !!!
>
>Just putting Evaluate[] inside the Plot[] does nothing...
>

Alexander

Use = or :=, not ==   in definitions.
Use
H[w_] == 20Log[10,Sum[a[k] Exp[I 2Pi w(-k)], {k,0,1}]]

Don't clear H before you use it.
Even so the H gives some complex values which cannot be plotted.

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

```

• Prev by Date: Re: implementing a stack
• Next by Date: Re: Pure Functions in rules
• Previous by thread: Re: Plot[] problem (plnr) - help !!!
• Next by thread: Re: Plot[] problem (plnr) - help !!!