I wrote a function which returns 1 if x^2 + y^2<=1:
f[x_, y_] := If[x^2 + y^2 <= 1, 1]
Now I'm trying to continue this function to take in multiple conditions like if x^2+y^2>1, |x|<=1 and |y|<=1, the function should return 0. I would also like to expand this function to take in 'or' statements such as if |x|>1 or |y|>1 then etc.
Which
,Switch
,And
andOr
. $\endgroup$ – Szabolcs Feb 9 '20 at 16:48