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.

 채택된 답변

Friedrich
Friedrich 2014년 7월 14일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

질문:

2014년 7월 14일

답변:

2014년 7월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by