Distance between point and an array.

Respuestas (1)

Walter Roberson
Walter Roberson el 13 de Oct. de 2019

0 votos

pdist2()

2 comentarios

Silpa K
Silpa K el 13 de Oct. de 2019
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))

Iniciar sesión para comentar.

Categorías

Etiquetas

Preguntada:

el 13 de Oct. de 2019

Comentada:

el 13 de Oct. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by