4 views (last 30 days)

The problem: a traveling salesman wants to visit all cities of a given together, and route distances between the various cities are known. Consider now the problem, starting and ending in a given city, determining the route to be taken by the traveling salesman who, once passing through the remaining cities, minimizes the total distance to be traveled. This problem will be developed using the neighbor's heuristic closest to go by choosing how next city to visit that that, among the cities not yet visited, is closest to the city where you are. This heuristic can be used in the traveling salesman problem. last city visited to the city of origin. The project consists of developing a menu application that allows the any user to use the resolution of this problem.

One of the menu options is' Show Affections' and for that we have to perform a function called 'prints? to show in the command window the allocations with their costs and the total cost. What is shown should respect this format:

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 5 Comments

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768506

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768506

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768508

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768508

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768512

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768512

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768514

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768514

## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768517

⋮## Direct link to this comment

https://ww2.mathworks.cn/matlabcentral/answers/491717-how-can-i-solve-this-problem#comment_768517

Sign in to comment.