| 1 | initial version |
One easy way is to use the Piecewise function. Some examples are given in the reference manual.
| 2 | No.2 Revision |
One easy way Will the following suit your needs?
def f(x,a):
if x <= a:
return 0
else:
return (x-a)^2
There is to use the also a Piecewise function. Some examples are given in the reference manual.class, but it doesn't look like it will work for what you want.
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.