Hi,

On Wed, Mar 14, 2012 at 7:56 AM, Laurent <[email protected]> wrote:
>  I'm searching for a function
> f(x)=1 if x in [a,b], =0 otherwise

how about using the Heaviside step function?

a=0
b=1
f(x) = heaviside(x-a) - heaviside(x-b)

Cheers,
-- 
Vegard

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to