Use pdist2
Minimum distance between 2 points
4 次查看(过去 30 天)
显示 更早的评论
I have 10 points distributed randomly. The x-coordinates and y-coordinates of the points are X=rand(1,10) and Y=rand(1,10). I need to calculate the minimum distance between any 2 points, i.e. distance between (Xi, Yi) and (Xj, Yj) , i=1,2,...10 and j=1,2,..10 (except values corresponding to i). Please suggest.
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!