FUNCTION REFERENCE
cluster
Cut a hierarchical linkage tree into groups.
Cut a hierarchical linkage tree into groups.
Syntax
T = cluster(Z,'MaxClust',n)Alternatively specify 'Cutoff',c, with 'Criterion','inconsistent' (default) or 'distance', and optional 'Depth' (default 2). A node is joined only if it and every descendant have a criterion value strictly below the cutoff. MaxClust uses the smallest distance threshold yielding at most n clusters; tied heights can yield fewer. Labels follow depth-first left-child traversal of the tree.
Example
t = cluster([1 2 1;3 4 5],'MaxClust',2); % [2;2;1]Differences from MATLAB: Scalar MaxClust and Cutoff only. Left-child traversal labels are deterministic; labels can differ across reference programs without changing cluster membership.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.