For rows and 2 columns, containing xOy coordinates of the point. Look for the two points with the furthest distance and return the row index of those two points.
2 ビュー (過去 30 日間)
古いコメントを表示
Please, Can y help me :
For rows and 2 columns, containing xOy coordinates of the point. Look for the two points with the furthest distance and return the row index of those two points.
0 件のコメント
回答 (1 件)
Chunru
2021 年 10 月 23 日
n = 8;
xy = rand(n, 2);
d = pdist(xy);
D = squareform(d)
[~, idx]= max(D(:));
[i, j] = ind2sub([n n], idx)
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!