function x=clamp(a,b,x)
% clamp - Clamp values into given (closed) interval
%
% clamp :: real, real, [Size] -> [Size].

x(x<a)=a;
x(x>b)=b;
%y=min(b,max(a,x));
