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 view (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!