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.

 Respuesta aceptada

Friedrich
Friedrich el 14 de Jul. de 2014

0 votos

Hi,
you can use squareform:
X = randn(10, 2);
D = squareform(pdist(X));

Más respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 14 de Jul. de 2014

Respondida:

el 14 de Jul. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by