function item = litem(list, index)
%
% LITEM(list, index)
%	returns a list element
%

% Matlab 4 and higher

% February 7, 1995, R. Sara (sara@vision.felk.cvut.cz), CVL Prague
% corrections: October 24, 1996, RS

if index > size(list,2)
 error('Index too large')
end

item = list(:, index);
item = reshape(item(3:2+prod(real(item(1:2)))), real(item(1:2))');
