Navigation

Operators and Keywords

Function List:

C++ API

Loadable Function: D = pdist2_mw (X, Y, p)

Loadable Function: D = pdist2_mw (X, p)

Assembles a pairwise minkowski-distance matrix for two given sets of points. X and Y should be real or complex matrices with a point per row, so numbers of columns must match. The matrix contains the pairwise distances D(i,j) = norm(X(i,:)-Y(j,:),P). p can also be the string 'ssq' requesting squared euclidean distance. (not a metric, but often useful and faster than p=2) If Y is not given, a symmetric distance matrix is calculated efficiently.

See also: norm