Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Hierarchical Clustering Package >

DistanceMatrix

DistanceMatrix[list]
gives a matrix of distances or dissimilarities between the elements of list.
  • The elements of list can be numeric lists, matrices, or tensors, lists of Boolean elements, or strings. All data elements must have the same dimensions.
  • The method used to compute dissimilarities can be selected with the DistanceFunction option.
  • The setting for DistanceFunction can be any distance or dissimilarity function or a pure function f defining a distance between two values.
Distance matrix for a list of numbers:
Needs["HierarchicalClustering`"]
Distance matrix for a list of numbers:
In[2]:=
Click for copyable input
Out[2]=
Distance matrix using ManhattanDistance:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF