# Distance Matrix 1.0

OS : Windows / Linux / Mac OS / BSD / Solaris

Script Licensing : Freeware

Created : Aug 23, 2007

Downloads : 10

Thank you for voting...

## Returns the point-to-point distance between all pairs ...

Returns the point-to-point distance between all pairs of points (similar to PDIST in the Statistics Toolbox, for those without it)

DMAT = DISTMAT(XY) Calculates the distance_matrix by Joseph Kirk using an automatic option

DMAT = DISTMAT(XY, OPT) Uses the specified option to compute the Distance Matrix 1.0

[DMAT, OPT] = DISTMAT(XY) Also returns the automatic option used by the function

OPT (optional) is an integer between 1 and 4 representing the chosen method for computing the Distance Matrix [distancematrix1.0.exe] (see note below)

OPT (optional) is an integer between 1 and 4 representing the method used to compute the Distance Matrix - 0MB (see note below)

OPT=1 Usually fastest for small inputs. Takes advantage of the symmetric property of distance matrices to perform half as many calculations

OPT=2 Usually fastest for medium inputs. Uses a fully vectorized method

OPT=3 Usually fastest for large inputs. Uses a partially vectorized method with relatively small memory requirement

OPT=4 Another compact calculation, but usually slower than the others

DMAT = DISTMAT(XY) Calculates the distance_matrix by Joseph Kirk using an automatic option

DMAT = DISTMAT(XY, OPT) Uses the specified option to compute the Distance Matrix 1.0

[DMAT, OPT] = DISTMAT(XY) Also returns the automatic option used by the function

**Inputs:**

XY is an NxP matrix of coordinates for N points in P dimensionsOPT (optional) is an integer between 1 and 4 representing the chosen method for computing the Distance Matrix [distancematrix1.0.exe] (see note below)

**Outputs:**

DMAT is an NxN matrix, where the value of DMAT(i, j) corresponds to the distance from XY(i, :) to XY(j, :)OPT (optional) is an integer between 1 and 4 representing the method used to compute the Distance Matrix - 0MB (see note below)

**Note:**

DISTMAT contains 4 methods for computing the Distance Matrix 1.0OPT=1 Usually fastest for small inputs. Takes advantage of the symmetric property of distance matrices to perform half as many calculations

OPT=2 Usually fastest for medium inputs. Uses a fully vectorized method

OPT=3 Usually fastest for large inputs. Uses a partially vectorized method with relatively small memory requirement

OPT=4 Another compact calculation, but usually slower than the others

**• MATLAB Release: R2007a**

**Demands:****Distance Matrix 1.0 scripting tags:**matlab matrix, method, distance, inputs, distance matrix, matlab mathematics, fastest.

**What is new in Distance Matrix 1.0 software script?**- Unable to find Distance Matrix 1.0 news.

**What is improvements are expecting?**Newly-made Distance Matrix 1.1 will be downloaded from here. You may download directly. Please write the reviews of the Distance Matrix. License limitations are unspecified.