function better= element_scan(mat,tab,group,i,checked)

for k=1:size(group)
        max.value=0;
        max.indexes=[0 0];
       for j=(i+1):(size(tab,2))
          for h=1:size(tab{2,j})
              if confronto(j,checked)==0 & max.value< mat(group(k),tab{1,j}(h))
                  max.value=mat(group(k),tab{1,j}(h));
                  max.indexes=[i j];
              end
          end
       end
        better{2,k}=max.value;
        better{1,k}=max.indexes;
end
