function k = kill(l,a,num)
%
%  Kills all labels in array a, from labeled image l
%
%
%   k = kill(l,a,num)  
%
%   (num is the number of labels in array a)

[mm,nn] = size(l);
temp = ones(mm,nn);
for i1 = 1:num
  temp = (l ~= ones(mm,nn).*a(i1)) & (temp);
end
k = temp.*l;