% matlab code to plot TSP tour load points.dat % move it to A n = points(1,1); TSPlength = points(1,2); A = points; A(1,:) = []; % figure number of arcs to plot N = size(A,1); if (n ~= N) error('wrong data'); end; clf; figure(1); x = A(:,1); y = A(:,2); scatter(x,y,100,[0 0 1],'+'); hold on plot(x,y,'r-'); plot([x(N), x(1)],[y(N),y(1)],'g-'); axis([-0.1 1.1 -0.1 1.1]); axis square; title('solution to TSP problem');