wolffd@0: wolffd@0: wolffd@0: wolffd@0: Netlab Reference Manual dist2 wolffd@0: wolffd@0: wolffd@0: wolffd@0:

dist2 wolffd@0:

wolffd@0:

wolffd@0: Purpose wolffd@0:

wolffd@0: Calculates squared distance between two sets of points. wolffd@0: wolffd@0:

wolffd@0: Synopsis wolffd@0:

wolffd@0:
wolffd@0: d = dist2(x, c)
wolffd@0: 
wolffd@0: wolffd@0: wolffd@0:

wolffd@0: Description wolffd@0:

wolffd@0: d = dist2(x, c) takes two matrices of vectors and calculates the wolffd@0: squared Euclidean distance between them. Both matrices must be of the wolffd@0: same column dimension. If x has m rows and n columns, and wolffd@0: c has l rows and n columns, then the result has wolffd@0: m rows and l columns. The i, jth entry is the wolffd@0: squared distance from the ith row of x to the jth wolffd@0: row of c. wolffd@0: wolffd@0:

wolffd@0: Example wolffd@0:

wolffd@0: The following code is used in rbffwd to calculate the activation of wolffd@0: a thin plate spline function. wolffd@0:
wolffd@0: 
wolffd@0: n2 = dist2(x, c);
wolffd@0: z = log(n2.^(n2.^2));
wolffd@0: 
wolffd@0: wolffd@0: wolffd@0:

wolffd@0: See Also wolffd@0:

wolffd@0: gmmactiv, kmeans, rbffwd
wolffd@0: Pages: wolffd@0: Index wolffd@0:
wolffd@0:

Copyright (c) Ian T Nabney (1996-9) wolffd@0: wolffd@0: wolffd@0: wolffd@0: