function y=F(x,h,c) if (x <= -h) y = 0.5*h/c; elseif ((x > -h) & (x <= h)) y = -0.5*x/c; else y = -0.5*h/c; end