Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #test case:
- library(emdist)
- Rows = 40
- Cols = 40
- Mat1 = matrix(
- seq(1,Rows*Cols),
- nrow = Rows,
- ncol = Cols)
- m0 <- matrix(0, Rows, Cols)
- Mat_Rand = apply(m0, c(1,2), function(x) rnorm(1)) #sample(c(0,1),1))
- Mat2 = Mat1 * Mat_Rand
- emd2d(Mat1,Mat2,dist="euclidean")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement