Distance between point and an array.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 10월 13일

0 개 추천

pdist2()

댓글 수: 2

Silpa K
Silpa K 2019년 10월 13일
Sir,using this function not getting.
For example a point 0.345 and an array=[0.0456,0.123,0.567,0.678,0.421]
I need to calculate distance between the point and the array.
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에 대해 자세히 알아보기

태그

질문:

2019년 10월 13일

댓글:

2019년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by