Learn R Programming

CspStandSegmentation (version 0.1.2)

p_mat_dist: Point distance function

Description

calculates euclidean distances for n dimensions between a matrix of points and a single point

Usage

p_mat_dist(mat, p)

Value

the distances between every row of mat and p

Arguments

mat

matrix with points as rows

p

point to calculate distances

Examples

Run this code
p_mat_dist(as.matrix(cbind(runif(100),runif(100))), c(3,4))

Run the code above in your browser using DataLab