Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. a <- cbind(c(1,2,3,4,5,6,7,8,9,10),c(1,2,1,2,1,3,4,2,3,4))
  2. b <- cbind(c(1,2,3,2,5,2,5,8),c(2,3,1,5,1,3,4,2))
  3. proxy::dist(a,b)
  4.  
  5. [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
  6. [1,] 1.000000 2.236068 2.000000 4.123106 4.000000 2.236068 5.000000 7.071068
  7. [2,] 1.000000 1.000000 1.414214 3.000000 3.162278 1.000000 3.605551 6.000000
  8. [3,] 2.236068 2.236068 0.000000 4.123106 2.000000 2.236068 3.605551 5.099020
  9. [4,] 3.000000 2.236068 1.414214 3.605551 1.414214 2.236068 2.236068 4.000000
  10. [5,] 4.123106 3.605551 2.000000 5.000000 0.000000 3.605551 3.000000 3.162278
  11. [6,] 5.099020 4.000000 3.605551 4.472136 2.236068 4.000000 1.414214 2.236068
  12. [7,] 6.324555 5.099020 5.000000 5.099020 3.605551 5.099020 2.000000 2.236068
  13. [8,] 7.000000 6.082763 5.099020 6.708204 3.162278 6.082763 3.605551 0.000000
  14. [9,] 8.062258 7.000000 6.324555 7.280110 4.472136 7.000000 4.123106 1.414214
  15. [10,] 9.219544 8.062258 7.615773 8.062258 5.830952 8.062258 5.000000 2.828427
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement