Format distance matrix
S=scidoe_squareform(D) D=scidoe_squareform(S) S=scidoe_squareform(D,"tomatrix") D=scidoe_squareform(S,"tovector")
a 1-by-b matrix of doubles, the distance vector, where b = m*(m-1)/2
a m-by-m matrix of doubles, the pairwise distances
S=scidoe_squareform(D)
converts the pairwise distances
D computed by scidoe_pdist
into the square matrix S,
so that S(i,j) is the distance between points i and j,
for i,j=1,2,...,m. The diagonal part of S is zero.
D=scidoe_squareform(S)
converts the
square matrix of distances S into the vector of distances
D.
By default, if D has a single entry (scalar), then convert it to a square matrix.
http://www.mathworks.fr/fr/help/stats/squareform.html