pair wise distance matric

1 vue (au cours des 30 derniers jours)
Mahdieh
Mahdieh le 14 Juil 2014
Pdist give me n (n-1)/2 distances .I want know how i can have all of distances even with repeat means n (n-1) distances.

Réponse acceptée

Friedrich
Friedrich le 14 Juil 2014
Hi,
you can use squareform:
X = randn(10, 2);
D = squareform(pdist(X));

Plus de réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by