MathGroup Archive 2005

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

Search the Archive

Re: Summary: Which[] as Textbook Input, Plot[] Questions


you can use the conditional operator "/;"

f[x_]:=Sin[x]/x/;x>0
f[x_]:=Sin[x]/x/;x<0
f[x_]:=1/;x==0

Alternatively, the following will also work

Clear[f]
f[0]:=1
f[x_]:=Sin[x]/x


  • Prev by Date: precision of numbers
  • Next by Date: Plotting just specific points
  • Previous by thread: Re: Summary: Which[] as Textbook Input, Plot[] Questions
  • Next by thread: Re: Summary: Which[] as Textbook Input, Plot[] Questions