You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
DATA FROM TXT FILES ARE RETRIVED AND SOLVE USING tsp.dp1.m
DESCRIPTION OF VARIABLES
n : number of cities
coor : txt file-name of coordinates, i.e. 'coor.txt'
dist : txt file-name of distance between cities, i.e. 'dist.txt'
city : txt file-name of cities' name, i.e. 'city.txt'
TXT FILES NEEDED:
1) coor.txt
* table of n-by-2 matrix
* first column contains latitude of each cities
* second column contains longitude of each cities
2) dist.txt
* table of n-by-n matrix
* each element represent distance between two cities
* all diagonal elements must be Inf
3) city.txt
* table of n-by-1 vector
* each row hold the name of cities
* name of cities cannot contain any spaces or symbols
Cite As
Faiq Izzuddin Kamarudin (2026). Travelling Salesman Problem by Dynamic Programming (https://in.mathworks.com/matlabcentral/fileexchange/54744-travelling-salesman-problem-by-dynamic-programming), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: Dynamic Programming solution to the TSP
General Information
- Version 1.0.0.0 (1.67 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.0.0.0 |
