Also introducing lambda function wasn't necessary:
import scipy.integrate
a=1.0
b=2.0
def fun(t):
if t<=-b:
return -a
elif fhttp://groups.google.com/group/sage-support
URL: http://www.sagemath.org
Of course
N=100 in "my" code and repeated
x0=[[0.5*k,0.5*k] for k in range(-10,10)]
in Marshall one are superfluous :)
Andrzej Chrzeszczyk
On 21 Mar, 13:58, kcrisman wrote:
> On Mar 20, 9:55 pm, Marshall Hampton wrote:
>
>
>
> > Slightly more Sage-ified version of the above very nice solution
On Mar 20, 9:55 pm, Marshall Hampton wrote:
> Slightly more Sage-ified version of the above very nice solution:
>
> import scipy.integrate
> a=1.0
> b=2.0
>
> def fun(t):
> if t<=-b:
> return -a
> elif f return t*a/b
> else:
> return a
>
> g=lambda t:fun(t)
>
Slightly more Sage-ified version of the above very nice solution:
import scipy.integrate
a=1.0
b=2.0
def fun(t):
if t<=-b:
return -a
elif fhttp://groups.google.com/group/sage-support
URL: http://www.sagemath.org
import scipy.integrate
import matplotlib.pyplot as plt
import numpy
a=1.0
b=2.0
def fun(t):
if t<=-b:
return -a
elif fhttp://groups.google.com/group/sage-support
URL: http://www.sagemath.org