MathGroup Archive 2008

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

Search the Archive

Re: Re: A plot of Sign[x]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94181] Re: [mg94106] Re: A plot of Sign[x]
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 6 Dec 2008 06:18:03 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <gh8hjr$r0h$1@smc.vnet.net> <200812051029.FAA24904@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

But that is NOT the graph of the function Sign, since Sign[0] has value 
0, and there's no point shown on the graph at x==0 then.

Interestingly enough, the following (which still misses a point at x == 
0), omits the spurious vertical segment that Sign gives:

   signum[x_]:=Piecewise[{{-1,x<0},{0,x==0},{1,x>0}}]

   Plot[signum[x], {x, -2, 2}, Mesh -> 51, PlotStyle -> Red,
  AxesOrigin -> {-2, 0}]

ucervan at gmail.com wrote:
> On Dec 4, 6:14 am, "Bert Aerts (rm X)" <bert.aer... at advalvas.beX>
> wrote:
>> I tried to plot the Sign function, making clear that Sign[0]=0 by typing
>> Plot[Sign[x], {x, -5, 5}, Mesh -> 51, PlotRange -> All]
>> Making Mesh an odd value shows x=0.
>>
>> But the point at x=0 is being plot as 0.5 in stead of zero.
>>
>> What am I doing wrong?
>>
>> Mathematica 6.0.3 Linux x86_64
> 
> 
> Try:
> 
> Plot[Sign[x], {x, -5, 5}, Mesh -> 51, PlotRange -> All,
>  Exclusions -> {x == 0}, MeshStyle -> Red, AxesOrigin -> {-5, 0}]
> 
> 
> Ulises Cervantes
> WRI
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Position of Last Element in List
  • Next by Date: Re: Mathematica 5,6,7 WeatherData, CityData
  • Previous by thread: Re: A plot of Sign[x]
  • Next by thread: Re: A plot of Sign[x]