Learn R Programming

genMCMCDiag (version 0.2.3)

eucDist: Euclidean Distance

Description

Simple function to return the Euclidean distance between two objects. Acts elementwise.

Usage

eucDist(x, y)

Value

Numeric, elementwise Euclidean distance between x and y.

Arguments

x

Numeric vector or matrix.

y

Numeric vector or matrix of same dimensions as x.

Examples

Run this code
eucDist(c(0,0), c(1,1))

Run the code above in your browser using DataLab