Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65824] Re: [mg65730] Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2
  • From: bsyehuda at gmail.com
  • Date: Mon, 17 Apr 2006 02:29:21 -0400 (EDT)
  • References: <200604160749.DAA11119@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I would recommend on changing the way you define the function u[x_,y_].
Which[] is a better way of expressing this function.
As for the graphical problem, you are trying to compare to an exact number
(0 in your case) while Plot3D has a sampling algorithm which for PlotPoints
different from 25 skips this value since it uses approximate values (Machine
precision numbers). Therefore, only 0 is returned (the default value of your function).
A better way is defining something such as
If[Abs[x]<= some small number
rather than
If[x==0

regards
yehuda


On 4/16/06, nma at 12000.org <nma at 12000.org> wrote:
>
> [This post has been delayed due to email problems - moderator]
>
>
> Remove["Global`*"]
>
> u[x_, y_] := Module[{},
>     If[x == 0, Return[1 + y]];
>     If[y == 0, Return[1]];
>     Return[0];
> ]
>
> Plot3D[u[x, y], {x, -1, 2}, {y, -1, 2},
>   FaceGrids -> None,
>   AxesLabel -> {"U(x,y)", "x", "y"},
>   PlotLabel -> "Boundary conditions",
>   PlotPoints -> 25]
>
> works OK. But if you change 25 to say 26 in the last line above, the
> plot does not show up any more !
>
> Can someone explain why this is?
>
> thanks,
> Nasser Abbasi
>
>


  • Prev by Date: Re: importing a mathematica plot in a latex file
  • Next by Date: No success with a package from the Wolfram Website
  • Previous by thread: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2
  • Next by thread: Re: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2