Learn R Programming

Momocs (version 0.2-6)

edm: Calculates euclidean distance every pairs of points in two matrices.

Description

edm returns the euclidean distances between points $$1 -> n$$ of two 2-col matrices of the same dimension. This function is used internally but may be of interest for other analyses.

Usage

edm(m1, m2)

Arguments

m1
The first matrix of coordinates.
m2
The second matrix of coordinates.

Value

  • Returns a vector of euclidean distances between pairwise coordinates in the two matrices.

Details

If one wishes to align two (or more shapes) Procrustes surimposition may provide a better solution.

See Also

ed, edm.nearest, dist.

Examples

Run this code
x <- matrix(1:10, nc=2)
edm(x, x)
edm(x, x+1)

Run the code above in your browser using DataLab