### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Clustering package (`scipy.cluster`) »
- Hierarchical clustering (`scipy.cluster.hierarchy`) »

# scipy.cluster.hierarchy.to_mlab_linkage

`scipy.cluster.hierarchy.``to_mlab_linkage`(Z)

  Converts a linkage matrix to a MATLAB(TM) compatible one.

  Converts a linkage matrix `Z` generated by the linkage function of this module to a MATLAB(TM) compatible one. The return linkage matrix has the last column removed and the cluster indices are converted to `1..N` indexing.

  Parameters : | Z : ndarray A linkage matrix generated by this library.
  Returns : | to_mlab_linkage : ndarray A linkage matrix compatible with MATLAB(TM)’s hierarchical clustering functions. The return linkage matrix has the last column removed and the cluster indices are converted to `1..N` indexing.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Clustering package (`scipy.cluster`) »
- Hierarchical clustering (`scipy.cluster.hierarchy`) »