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 visualizzazione (ultimi 30 giorni)
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 Commenti
M.Prasanna kumar
M.Prasanna kumar il 4 Feb 2019
Modificato: M.Prasanna kumar il 4 Feb 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

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by