PIECEWISE_EVAL: evaluates a piecewise function of x usage: y = PIECEWISE_EVAL(x,breakpoints,funs) arguments (input) x - vector or array of points to evaluate though the function breakpoints - list of n breakpoints, -inf and +inf are implicitly