Distance between point and an array.
显示 更早的评论
How can I find distance between a point and an n-array elements.
回答(1 个)
Walter Roberson
2019-10-13
0 个投票
pdist2()
2 个评论
Silpa K
2019-10-13
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))
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!