Excel - 3D 笛卡尔点 - 一大组点的欧氏距离

Excel - 3D cartesian points - euclidean distance for a large group of points

我在 Excel 中有一大组 XYZ 笛卡尔点(实际上大约 40k),我正在寻找一个公式或宏来比较每个点与其他每个点以获得它们之间的距离。

获得两个 3D 点之间的距离值的数学是:

Distance=SQRT((X2 – X1)^2 + (Y2 – Y1)^2 + (Z2 – Z1)^2)
X1=the X value of the 1st point
X2=the X value of the 2nd point
Y1=the Y value of the 1st point
Y2=the Y value of the 2nd point
etc

这是一个从 10 点开始的例子:

http://i.imgur.com/U3lchMk.jpg

有人知道如何将它构建到 Excel 中,这样我就可以将整个页面的公式复制到水平限制吗?或者您会推荐一种比使用 Excel 更好的方法吗?

作为次要目标,我想将这些点分组为可以连接距离小于 2 的簇。但是如果我能完成第一个目标,我可以稍后再考虑第二个。

实际上,我通过更多的研究得出了解决方案:i.imgur.com/9JL5Qni.jpg =SQRT(((INDIRECT("A"&$D2 ))-(间接("A"&E$1)))^2+((间接("B"&$D2))-(间接‌ ("B"&E$1)))^2 +((间接("C"&$D2))-(间接("C"&E$1)))^2)