dist2: Calculates Euclidean distance between coordinates of two matrices
Description
Calculates Euclidean distance between the coordinates of coords1
and coords2 matrices. It is assumed that coords1 and
coords2 have the same number of columns but not
necessarily the same number of rows.
Usage
dist2(coords1, coords2)
Arguments
coords1
A matrix of dimensions $nr1\times nc$
coords2
A matrix of dimensions $nr2\times nc$
Value
dist2 returns a matrix of size $nr1\times nr2$ containing the
Eucliean distances between
each pair of coordinates in coords1 and coords2.