You are here: Symbol Reference > Statistics Namespace > Functions > Statistics.PairwiseDistance Function
Stats Master VCL
ContentsIndex
Example

Suppose we have collected 5 data points with 3 variables. The data matrix will look like:

X=[2,1,3,
  2,3,1,
  4,5,6,
  6,6,6
  7,5,3]

To calculate Euclidian distance between each pair of points, we use the following code:

  PairWiseDistance(X,D,3); // 3 dimensions for 3 variables

Generated distance matrix has zero diagonal and is always symmetric.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.