function m = maxbin(a)
%
l = length(a);
mmax = 0; m = [];
for l1 = 1:l
  if a(l1)>mmax
    mmax = a(l1);
    m = [l1];
  elseif a(l1) == mmax
    m = [m, l1];
  end
end
