I would like to normalize the euclidean distance between two points so that it becomes between 0 & 1. The points are represented as follows: (x,y).
Any ideas?
I would like to normalize the euclidean distance between two points so that it becomes between 0 & 1. The points are represented as follows: (x,y).
Any ideas?
Here's a solution, however, I urge you to read my comment on your question above. Also, consider @Adriaan 's comment as well for future reference!
% First point
x1 = 5;
y1 = -2;
% Second point
x2 = 12;
y2 = 9;
% Absolute distance between the points is your normalization factor
normFactor = sqrt((x1-x2)^2 + (x1-x2)^2);
Divide everything in your Euclidean space with the normFactor. If you divide your distance, you will of course get distance = 1