Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

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[0]==1
>a[1]==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 !!!