Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Linear Algebra
See also: agglom bindata grid

Function: distance
Description: distance computes the distance between p-dimensional datapoints depending on a specified metric.

Usage: d = distance (x {, metric})
Input:
x n x p matrix
metric string indentifying the metric name
Output:
d symmetric n x n matrix of pairwise distances

Note:

Example:

x = #(1,4)~#(1,5)
distance (x, "l1")
distance (x, "l2")
distance (x, "maximum")
Result:

Contents of distance
[1,]     0     7 
[2,]     7     0 
Contents of distance
[1,]     0     5 
[2,]     5     0 
Contents of distance
[1,]     0     4 
[2,]     4     0 

Group: Linear Algebra
See also: agglom bindata grid

Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

(C) MD*TECH Method and Data Technologies, 17.8.2000