How i can read the distance in matrix figure?
1 view (last 30 days)
Show older comments
Such as
Answers (1)
Image Analyst
on 31 Aug 2015
Each city has a number and coordinates. For example, maybe you have an array "cityLocations" which is N rows (one row for each city) and 2 columns, for the x and y coordinates of the location represented by that row. Then you appear to have the distanceMatrix. So to find the distance between, for example, city #3 and city #7, just index into the array:
distance3to7 = distanceMatrix(3, 7);
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!