function vecl = limitrange( vec, minv, maxv)
% vecl = limitrange( vec, minv, maxv)
% 
% Limits a vectors value to the boundaries supplied by the minv and maxv
% parameters. So:
% limitrange( 1:10 , 4, 6) 
% ans = 4     4     4     4     5     6     6     6     6     6
% 
% Yannick Kremer 2010

vecl = vec;
vecl( vec<minv) = minv;
vecl( vec>maxv) = maxv;

