I have to plot a function T(x,x) which equals xy if xy>0 and x+y otherwise. I have defined the function:
def T(x,y):
if (x*y>0):
return x*y
else:
return x+y
but it does not work.
1 | initial version |
I have to plot a function T(x,x) which equals xy if xy>0 and x+y otherwise. I have defined the function:
def T(x,y):
if (x*y>0):
return x*y
else:
return x+y
but it does not work.