function BinS=BinarySearch(argu,sumabs)

if norm(argu,2)==0 || sum(abs(argu./norm(argu,2)))<=sumabs 
   BinS=0;
return
end
lam1 = 0;
lam2 = max(abs(argu))-1e-5;
iter = 1;
  while iter < 150
    su = soft(argu,(lam1+lam2)/2);
    if sum(abs(su/norm(su,2)))<sumabs
      lam2 = (lam1+lam2)/2;
     else 
      lam1= (lam1+lam2)/2;
    end
    if (lam2-lam1)<1e-6
      BinS=(lam1+lam2)/2;
      return
    end
    iter = iter+1;
  end
  warning('Did not quite converge')
   BinS=((lam1+lam2)/2)
return