Pairwise point distances of a matrix
a m-by-n matrix of doubles, the input vector
a 1-by-b matrix of doubles, the distance vector, where b = m*(m-1)/2 the binomial coefficient
This function computes all the pairwise point distances of a matrix. The number of combinations of the points in each variable (column) is equal to the binomial coefficient m*(m-1)/2.
The resulted matrix contains all pairwise point distances, arranged in the order (2,1), (3,1), ..., (m,1), (3,2), ..., (m,2), ..., (m,m–1) If input matrix X includes only one sample point, then an empty matrix is returned.
The function implements only the Euclidean distance case.
http://www.mathworks.com/help/toolbox/stats/pdist.html
http://forge.scilab.org/index.php/p/specfun/source/tree/HEAD/macros/specfun_subset.sci