Agglomerative clusters from data
T = clusterdata(X,cutoff)
T = clusterdata(X,Name,Value)
T = clusterdata(
returns the cluster indices (X
,cutoff
)T
) for each observation (row) of the
data (X
) while adhering to a threshold for cutting the hierarchical
tree (cutoff
).
clusters with additional options specified by one or more
T
= clusterdata(X
,Name,Value
)Name,Value
pair
arguments.

Matrix with two or more rows. The rows represent observations, the columns represent categories or dimensions. 

When 
Specify optional
commaseparated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as Name1,Value1,...,NameN,ValueN
.

Either  

Cutoff for inconsistent or distance metric, a positive scalar. When
 

Depth for computing inconsistent values, a positive integer.  

Any of the distance metric names allowed by
For more information on these distance metrics, see Distance Metrics.  

Any of the linkage methods allowed by the
For details, see the definitions in the 

Maximum number of clusters to form, a positive integer. 

Either When Default: 


The centroid
and median
methods
can produce a cluster tree that is not monotonic. This occurs when
the distance from the union of two clusters, r and s,
to a third cluster is less than the distance between r and s.
In this case, in a dendrogram drawn with the default orientation,
the path from a leaf to the root node takes some downward steps.
To avoid this, use another method. The following image shows a nonmonotonic
cluster tree.
In this case, cluster 1 and cluster 3 are joined into a new cluster, while the distance between this new cluster and cluster 2 is less than the distance between cluster 1 and cluster 3. This leads to a nonmonotonic tree.
You can provide the output T
to
other functions including dendrogram
to
display the tree, cluster
to
assign points to clusters, inconsistent
to
compute inconsistent measures, and cophenet
to
compute the cophenetic correlation coefficient.
cluster
 inconsistent
 kmeans
 linkage
 pdist