out= clip(in, low, high) Clips data (scalar, vector or matrix) so that for every element LOW <= IN<= HIGH. LOW can be '-inf', and HIGH can be 'inf', for one sided operations. data = input matrix, vector or scalar low = lower scalar value high = (optional) upper scaler value out = clipped output data. Examples: out = clip(in, 0) all values < 0 set = 0 out = clip(in, 0, 255) clip to [0, 255] out = clip(in, -inf, 10) out < or = 10 Author: Peter Burns, 1 Oct. 2008 Copyright (c) 2007 Peter D. Burns