Calculating the distance matrix from coordiante matrix
Show older comments
Hello,
How can I calculate the distance matrix? for example I have the coordinate matrix: A=[3 5 4 5; 1 2 6 3] and I want to find the distance between each pair of points.
Thanks in advance for any help!
Accepted Answer
More Answers (1)
Walter Roberson
on 1 Feb 2016
0 votes
pdist() if you have the stats toolbox
3 Comments
Nour BS
on 1 Feb 2016
Walter Roberson
on 1 Feb 2016
What is "matrix distance" of points?
pdist allows you to pass any of several different distance function names as a string in the second parameter, or you can pass a custom distance function by function handle.
Nour BS
on 1 Feb 2016
Categories
Find more on Fit Postprocessing 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!