Learn R Programming

Momocs (version 1.4.1)

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)

Value

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

Arguments

m1

The first matrix of coordinates.

m2

The second matrix of coordinates.

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