Learn R Programming

CVEK (version 0.1-2)

euc_dist: Computing Euclidean Distance between Two Vectors (Matrices)

Description

Compute the L2 distance between two vectors or matrices.

Usage

euc_dist(x1, x2 = NULL)

Arguments

x1

(vector/matrix) The first vector/matrix.

x2

(vector/matrix, the same dimension as x1) The second vector/matrix.

Value

dist

(numeric) Euclidean distance.

Details

This function gives the Euclidean distance between two vectors or matrices.