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 (최근 30일)
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
M.Prasanna kumar
M.Prasanna kumar 2019년 2월 4일
편집: M.Prasanna kumar 2019년 2월 4일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by