Files
MATLAB3/main.m

22 lines
606 B
Mathematica
Raw Normal View History

2025-03-26 20:08:20 +08:00
%
load('postion_att48.mat');
% positions
%
distMatrix = calculateDistanceMatrix(postion);
%
disp(':');
disp(distMatrix);
% 1
startCity = 1;
%
[route, totalDistance] = calculateTourDistance(distMatrix, startCity);
%
fprintf('%d: %.2f\n', startCity, totalDistance);
%
plotTour(postion, route);