powered by
dist2
coords1
coords2
dist2(coords1, coords2)
x1 <- matrix(rnorm(30), ncol = 3) x2 <- matrix(rnorm(60), ncol = 3) dist2(x1, x2)
Run the code above in your browser using DataLab