I have a table containing the (x,y) coordinates and I need to find the distance between each point and save it as an array. Could anybody please guide me?
K1495 - what can you tell us about your table? Can you convert it to an mx2 array for each of your m points? If you have the Statistics and Machine Learning Toolbox, you could probably use pdist.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
3 Comments
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1136048
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1136048
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1138558
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1138558
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1146023
Direct link to this comment
https://se.mathworks.com/matlabcentral/answers/648813-distance-between-points-in-a-table#comment_1146023
Sign in to comment.