MathGroup Archive 2006

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

Search the Archive

RE: Re: Plot3D question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70677] RE: [mg70641] Re: Plot3D question
  • From: "Erickson Paul-CPTP18" <Paul.Erickson at Motorola.com>
  • Date: Mon, 23 Oct 2006 02:49:45 -0400 (EDT)

I think it was just a matter of chance. The numbers you selected (i.e.,
+/-10 and with 100 points) didn't happen to hit on an exact 0 in the
denominator. You could get closer with an odd number of plotpoints and
plotrange all, but still might not hit it depending on the platform.
However, I did hit it and you might as well with:

Plot3D[Sin[x]/y, {x, -8, 8}, {y, -8, 8}, PlotPoints -> 129]

This selection of range of y being of the form 2^n and the number of
points being 1+2^m would likely get some complaints starting out with
either divide by 0 or result of infinity.

Hope that helps ?
Paul
 

-----Original Message-----
From: dimitris [mailto:dimmechan at yahoo.com] 
To: mathgroup at smc.vnet.net
Subject: [mg70677] [mg70641] Re: Plot3D question

I would like to apologise for the mistakes which obviously contained my
previous post.
Here comes the correct one:
---------------------------------------------------------------

 I would like to know why the Plot3D function does not complain about
the following command (note there is a singularity at y=0)

 Plot3D[Sin[x]/y, {x, -10, 10}, {y, -10, 10}]

 whereas it does complain (a lot!) about the following

Plot3D[Sin[x]/y, {x, -10, 10}, {y, 0 10}]

 I believe it has to do with the non-adaptive algorithm used by Plot3D,
but even the command

Plot3D[Sin[x]/y, {x, -10, 10}, {y, -10, 10},PlotPoints->100]

 does not change the behavior.

 Note that I don't have any problem why the Plot function does not
complain about the following command

 Plot[Sin[x]/x, {x, 0, 10}];

since I understand that the adaptive algorithm actually does not sample
points at x=0

Cases[%, {(x_)?NumberQ, (y_)?NumberQ} /;
   x >= 0 && y > 0.9, Infinity]

I really appreciate any comments/guidance/insight.

Thanks
Dimitris


  • Prev by Date: Re: Re: Problem in loading packages in Mathematica
  • Next by Date: Re: Using "=" vs ":="
  • Previous by thread: Re: Plot3D question
  • Next by thread: Re: Re: Subscript vs SubscriptBox