I need to compare $n$ 3-dimensional vectors with $k$ 3-dimensional vectors using euclidean distance. Is that possible?
$\begingroup$
$\endgroup$
1
-
$\begingroup$ Getting the Euclidean distance between 2 3D points is no problem. Then to get the Euclidean distance from $n$ points to $k$ points. Do you want the addition of all these distances, or the average, or what? $\endgroup$– JahKnowsCommented Jun 15, 2018 at 0:53
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
The Euclidean distance between 2 vectors
$\mathbf{u}$: $(u_1, u_2, ... , u_n)$ and $\mathbf{v}$: $(v_1, v_2, ... , v_n)$
is simply
$\sqrt{(u_1-v_1)^2+(u_2-v_2)^2+...+(u_n-v_n)^2}$