Distance between point and an array.
3 次查看(过去 30 天)
显示 更早的评论
How can I find distance between a point and an n-array elements.
0 个评论
回答(1 个)
Walter Roberson
2019-10-13
pdist2()
2 个评论
Walter Roberson
2019-10-13
pdist2(point, array.')
However, for the simple 1D case, perhaps you want
abs(point - array)
and my guess is you want
min(abs(point - array))
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!