function b = clobber(a,indexes)
% b = clobber(a,indexes)
%
%     Zero out everything except values at locations in indexes
%
% On input:
%          a: matrix
%    indexes: m by 2 matrix of indexes of a
%
% On output:
%          b: zero everywhere, then put in values of a selected by indexes
%
[m n] = size(a);
b = zeros(m,n);
[nr,nc] = size(indexes);
for i1 = 1:nr
  b(indexes(i1,1),indexes(i1,2)) = a(indexes(i1,1),indexes(i1,2));
end
