MathGroup Archive 2007

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

Search the Archive

Limiting range of variables when defining funxtions of several variables

Hello everybody,
my problem is that I would like to plot a 3d graphic of a function of
two variables, restricted to domain D={(x,y): x>= 0, y>=0, y <= 1-x}.

I thought to define the function in this way:
test[x_,y_/; y <= 1-x]:= x+y

but this seems not to work, while it works for functions of one
variable, i.e.:
test2[x_/; x<= 1]:= 3x

So, am I doing some syntax error, or is there some other kind of
problems with my definition?

  • Prev by Date: Re: comments in import files
  • Next by Date: Re: ReadList
  • Previous by thread: Re: Definite Integration in Mathematica (continuous antiderivative from Gass' book)
  • Next by thread: How to set SVD options?