MathGroup Archive 1998

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

Search the Archive

Re: beginner's question -- syntax related?

John M. Dlugosz wrote:
> 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

This may help:

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

Plot is one of a few, but important functions that do not follow the
standard evaluation procedure. See 2.5.5 of the Mathematica book for an

  • Prev by Date: Re: Re: Non-commutative algebra
  • Next by Date: Re: How to declare Integers?
  • Previous by thread: Re: beginner's question -- syntax related?
  • Next by thread: Up N' Down values.