此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)

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.
Needs["HierarchicalClustering`"]
Distance matrix for a list of numbers:
In[2]:=
Click for copyable input
Out[2]=