function ft = indfit(x,A)


     ft = 0;
     [N,n] = size(A);
     for i = 1:N
       ft = ft + hamdist(x,A(i,1:n));
     end
