| Author |
Comment/Response |
Eric Burling
|
04/08/04 05:54am
Am relative new-comer to Mathematica (v 5.0) and need to define a piecewise function in 2 variables f[x,y] to cover 2 distinct argument ranges e.g. For 0<x<5 and 0<y<10 f[x,y]=x^2+2y
For 5<=x and 10<=y f[x,y]=3x-9y
Have tried :-
f[x_,y_]:=x^2+2y/;{0<x<5 And 0<y<10}
f[x_,y_]:=3x-9y/;{5<=x And 10<=y}
but this does'nt seem to work. Am I missing something obvious?
URL: , |
|