Distance between point and an array.

16 views (last 30 days)
Silpa K
Silpa K on 13 Oct 2019
Commented: Walter Roberson on 13 Oct 2019
How can I find distance between a point and an n-array elements.

Answers (1)

Walter Roberson
Walter Roberson on 13 Oct 2019
pdist2()
  2 Comments
Walter Roberson
Walter Roberson on 13 Oct 2019
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))

Sign in to comment.

Categories

Find more on Elementary Polygons in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!