How to define conditional function $f(x,y)$ with the following result. If $x=1$ and $y=0$ then $f=77$, if $x=0$ and $y=1$, then $f=66$, if $x$ and $y$ are all other integer values then $f=0$. How to define in Mathematica phrase 'all other values'?
f[x_,y_]:=Which[x==1 && y==0, 77,
x==0 && y==1, 66,
"all other values of x,y", 0]
True
? btw, what does&& ,
mean, please pay attention. p.s.Switch
would be more handy here, take a look atPiecewise
too. $\endgroup$,
after&&
. $\endgroup$