function b = bmask(bands,f)
% b = bmask(bands,f)
%
% Creates a matrix on non-zero values for each band
%
% On input:
%          bands: bands matrix of dimension # bands by 20
%              f: image function (needed for dimension of mask)
%
% On output:
%              b: non-zero across band extent
%
[m n] = size(f);
b = zeros(m,n);
[bm bn] = size(bands);
for i1 = 1:bm
  if bands(i1,20)==i1   % it's a rep
    for j1 = bands(i1,1):bands(i1,2)
      b(bands(i1,15),j1) = 255;
    end
  end
end
