MathGroup Archive 2001

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

Search the Archive

Re: Bump Function

  • To: mathgroup at
  • Subject: [mg31986] Re: Bump Function
  • From: atelesforos at (Orestis Vantzos)
  • Date: Sat, 15 Dec 2001 01:30:03 -0500 (EST)
  • References: <9vchll$3mm$>
  • Sender: owner-wri-mathgroup at

> 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
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
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.

  • Prev by Date: Re: numerical approximation to the diffusion equation in Mathematica?
  • Next by Date: Re: Can I clear all vaiables ?
  • Previous by thread: RE: Bump Function
  • Next by thread: Re: Bump Function