Z = squareform(D)
D = squareform(Z)
Y = squareform(X, direction)
| Parameter | Description |
|---|---|
| D | distance vector with n*(n-1)/2 elements. |
| Z | square symmetric distance matrix. |
| direction | 'tomatrix' or 'tovector'. |
squareform converts a condensed distance vector to a square symmetric matrix, or the reverse.
D = [1 2 3];
Z = squareform(D)
D2 = squareform(Z)
| Version | Description |
|---|---|
| 2.0.0 | initial version |