function result = in(list,value)

% result = in(list,value)
%           Vraci 1, je-li value v seznamu list,
%           jinak vraci 0.

[m,n] = size(list);

result = 0;

for i=1:m
    for j=1:n
        if list(i,j) == value
            result = 1;
            break;
        end
    end
end
