powered by
This function computes the Euclidean distance between the lower triangular parts of two given matrices.
euclidean(mat1, mat2)
A numeric value representing the Euclidean distance between the lower triangular parts of mat1 and mat2.
mat1
mat2
A numeric matrix.
mat1 <- matrix(c(1, 2, 3, 4), 2, 2) mat2 <- matrix(c(4, 3, 2, 1), 2, 2) euclidean(mat1, mat2)
Run the code above in your browser using DataLab