d = dist2(x, c)
d = dist2(x, c)
takes two matrices of vectors and calculates the
squared Euclidean distance between them. Both matrices must be of the
same column dimension. If x
has m
rows and n
columns, and
c
has l
rows and n
columns, then the result has
m
rows and l
columns. The i, j
th entry is the
squared distance from the i
th row of x
to the j
th
row of c
.
rbffwd
to calculate the activation of
a thin plate spline function.
n2 = dist2(x, c); z = log(n2.^(n2.^2));
gmmactiv
, kmeans
, rbffwd
Copyright (c) Ian T Nabney (1996-9)