load title.csv; ind = find(title(1,:)); commons = zeros(size(title,1),1); differents = zeros(size(title,1),1); for i = 2:size(title,1) tempInd = find(title(i,:)); for j = 1:size(tempInd,2) for k = 1:size(ind,2) if ind(k) == tempInd(j) commons(i) = commons(i) + 1; else differents(i) = differents(i) + 1; end end end end distance = commons - differents; [] = sort(distance, '');