Re: How to set y always greater than or equal to x for a function?

*To*: mathgroup at smc.vnet.net*Subject*: [mg46585] Re: How to set y always greater than or equal to x for a function?*From*: "Bo Le" <bole79 at email.si>*Date*: Tue, 24 Feb 2004 21:04:37 -0500 (EST)*References*: <c1ehpp$kgg$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Helo! The y domain specification in Plot3D cannot depended on x, otherwise you could do something like {x,-100,100},{y,x,100}, but you can always IF your function, e.g. myFunction[x_,y_]:=If[x>y,0,Sqrt[y-x]] Plot3D[myFunction[x,y],{x,-100,100},{y,-100,100}] Good bye, Borut Levart Slovenia "Albert Franco" <francoatnsuok at earthlink.net> wrote in message news:c1ehpp$kgg$1 at smc.vnet.net... > I recently purchased Mathematica 5.0, and I am in the process of > learning how to take advantage of it's many features. > > This is an example of one line I would like to calculate in Mathematica: > > Plot3D[Sqrt[y-x],{x,-100,100},{y,-100,100}]; > > > How can I best edit this line to make y always greater than or equal to x during > calculation so the program doesn't try to take the square root of a > negative number? > > Any help will be appreciated. > > Albert Franco > > > >