Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What's about a python function?

def my_piecewise(x0,x1):
    if 0 < x0 < x1 < 1:
        return piecewise([((0,x0),0), ([x0,x1],1), ((x1,1),2)], var=x)

my_piecewise(0.2,0.7).plot()