applying a function of sqrt on a data frame

Viewed 718

I want to compute the following equation between each two points, i dont know how to apply that in the whole data set:

Point  x y z
1      4 3 8
2      8 5 4
3      5 4 7
4      2 7 4

D1,2 = sqrt((x2-x1)²+ (y2-y1)²+( z2-z1)²)
1 Answers
Related