function y = batas_xdot(x)
B = 0.1;
pos = x(1);
xdot = x(2);
if pos == B
    if xdot >=0
        y = 0;
    else
        y = xdot;
    end
elseif pos == -B
    if xdot <= 0
        y = 0;
    else
        y = xdot;
    end
else
    y = xdot;
end