function str = sprintf_ranges(R, V)

if nargin < 2
	V = 1:R{end}(end);
end

str = '';

for i=1:length(R)
	str = sprintf('%s %f-%f', str, V(R{i}(1)), V(R{i}(end)));
end
