% build votes from mzp, mzd, tzd, tsonars
closeness = 30*pi/180;
%angles = abs(angle((1 ./ tzd')*(mzd)))<closeness;
angles = abs(angle((1./transpose(tzd))*mzd))<closeness;

thevotes = [];
whyvotes = [];
c = 0;
if (1),
	for j=1:length(tzd),
      %disp(num2str(j));
	   for k=1:length(mzd),
	      if angles(j,k),
			 c = c + 1;
	         thevotes(c) = mzp(k)-tzd(j)*tsonars(j);
	         whyvotes(1,c) = j;
	         whyvotes(2,c) = k;
	      end
	   end
	end
end
