Re: Bump Function

*To*: mathgroup at smc.vnet.net*Subject*: [mg31986] Re: Bump Function*From*: atelesforos at hotmail.com (Orestis Vantzos)*Date*: Sat, 15 Dec 2001 01:30:03 -0500 (EST)*References*: <9vchll$3mm$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

> f(x,y) = x^2+y^2 for x^2+y^2<1 > = 2 for x^2+y^2 >2 You have a gap between 1 and 2 where the function is not defined. Hence you can not draw it there! I will assume this is a typo, and let's say you want to define this function: f(x,y) = x^2+y^2 for x^2+y^2<1 and f(x,y) = 1 for x^2+y^2>=1 You can use patterns with conditions to translate literaly into Mathematica: f[x_,y_]/;x^2+y^2<1 := x^2+y^2 f[x_,y_]/;x^2+y^2>=1 := 1 Now you can plot f, just like any other function. Orestis