Let's say: I have 2 dataset containning 3d points:
A=[1 1 1;1.5 1 1;2 1 1;2.5 1 1;3 1 1;1 2 1;3 2 1;1 3 1;1.5 3 1;2 3 1;2.5 3 1;3 3 1;1 1.5 1;1 2.5 1;3 1.5 1;3 2.5 1];B=[2 1.1 1; 2 1.5 1;2 2 1; 2 2.5 1;2 2.9 1];%matrix contain 5 red points
How can we find the point belong to matrix B, that having the smallest distance to any point belong to matrix A?
Best Answer