function range = setrange(range,infrange)

% The IRIS Toolbox.
% Copyright (c) 2007-2012 Jaromir Benes.

%**************************************************************************

if isequal(range,Inf) && nargin > 1
   range = infrange;
   return
end

if ~isequal(range,Inf) && ~isempty(range)
   range = range(1) : range(end);
end

end