I'm trying to define a bivariate function that takes values depending on whether a condition is met. I make them work for univariate case but I'm stuck with the bivariate case:
g[x_, y_] := 10 /; x < 10
g[x_, y_] := 20 /; (x >= 10 && y < 5)
g[x_, y_] := -5 /; (x >= 10 && y >= 5);
This function never gives me the value of -5.
g[12,10] = 20?
gand clearing it helped.gworks fine. Now. Strange thing is that when I tried it in a fresh Mathematica session last night the definitions returned$Failed.