I have followwing code in which xn = (x1,y1)& yn= (x2,y2) coordinates.Distance between each (x1,y1) and (x2,y2) is greater than 22.i want (x,y) coordinates, condition is distances between every coordinate to all other coodinates should be >22

1 visualización (últimos 30 días)
F = [x5;y5]'; %% x,y coordinates
D = pdist(F);
indx = squareform(D)>22;
[p1,p2] = find(triu(indx));
xn = F(p1 , :);
yn = F(p2 , :);
distances between every coordinate to all other coodinates should be greater than 22. that means all possible distances distances between any coordinate point to every other coodinate point should be greater than 22
  2 comentarios
M.Prasanna kumar
M.Prasanna kumar el 4 de Feb. de 2019
Editada: M.Prasanna kumar el 4 de Feb. de 2019
i am getting xn is n*2 matrix and yn is n*2 matrix . (n = 474192)
  1. distance between first row of xn and first row of yn is greater than 22.
  2. distance between second row of xn and second row of yn is greater than 22.
  3. and so on.....
at a time it is checking distance with only one coordinte. but i want (x,y) coordinates which are at a distance greater than 22 from each coordinate to every other coodinate. so that all possible distances between all coordinates should be graeter than 22

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Geometric Transformation and Image Registration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by