MathGroup Archive 1998

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

Search the Archive

Re: beginner's question -- syntax related?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13360] Re: beginner's question -- syntax related?
  • From: "Allan Hayes" <hay at haystack.demon.cc.uk>
  • Date: Mon, 20 Jul 1998 02:50:13 -0400
  • References: <6okkt8$1m0@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

John M. Dlugosz wrote in message <6okkt8$1m0 at smc.vnet.net>...
>This works:  Plot[{3-Sqrt[5-4x-x^2],3+Sqrt[5-4x-x^2]}, {x, -5, 0}]
>
>This doesn't:
> ls := {3-Sqrt[5-4x-x^2],3+Sqrt[5-4x-x^2]}, {x, -5, 0}
>
> Plot[ls, {x,-5,0}]
>
>Somehow, the ls isn't getting taken as the list of two expressions.  I
>tried both = and := when creating ls, with the identical effect.
>
>Clearly, I'm missing something about syntax.  Can someone help me?
>
>--John
>

John,

Plot does not know that ls will be a list when evaluated, use

Plot[Evaluate[ls], {x,-5,0}]

------------------------------------------------------------- 
Allan Hayes
Training and Consulting
Leicester UK
http://www.haystack.demon.co.uk
hay at haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44(0)116 271 8642



  • Prev by Date: Animation
  • Next by Date: Interpolated animation
  • Previous by thread: beginner's question -- syntax related?
  • Next by thread: Re: beginner's question -- syntax related?