Learn R Programming

Momocs (version 0.1-03)

Utilities: edm: Pairwaise euclidean distance between two matrices/lists of coordinates.

Description

This function calculates point-to-point euclidean distance between two matrices containing the same number of $(x; y)$ coordinates. It can be used to calculate deviations between shapes that has previously been aligned.

Usage

edm(m1, m2)

Arguments

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

Value

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

Details

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

See Also

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