function R = clip(X, x_min, x_max) R = (X >= x_max) & ~(X <= x_min); end