Finding Distance Between Each Point (not the diagonal distance)
Show older comments
Hi all, I am trying to calculate distance between 50 points. The coordinates of the points are given in the coordinates.xlsx excel file. 1st column is the X coordinate and the 2nd column is Y coordinate. I want to create a 50x50 matrix which shows distances between those points, but I cannot move diagonally. I can only move in X and Y coordinates to calculate distance.
Accepted Answer
More Answers (1)
Matt J
on 27 Dec 2019
result=pdist2(XY,XY,'cityblock')
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!