how to calculate the distances between points coordinates and the arbitrary reference point using loops?
7 Ansichten (letzte 30 Tage)
This solution is solved before within a little change, They have calculated the distances between pairwise coordinate. as you can see inside the link below:
But in my question the X and Y have points inside which are increase sequentially. For example:
Let us consider:
X = [0 2 4 6; 0 2 4 6; 0 2 4 6]; % and
Y = [0 0 0 0; 2 2 2 2; 4 4 4 4; 6 6 6 6];
all of the points inside X and Y are due to the geometry of my model configuration. Let consider a reference point which is inside the model.I need to find the distance between all points and reference point. I know that I should use a loop for the sequential changes but I don't know how?
I should note that the configuration may be changed.
Rik am 25 Feb. 2018
If X and Y contain the coordinates of your sample points, then the code below will give you the Euclidean distance between the fixed point and the sample points.
F_x=3;F_y=3;%coordinates of the fixed point
I don't really see the connection to the question you linked to, so please leave a comment if this isn't what you mean.