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.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.