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 ExchangeMATLAB についてさらに検索

質問済み:

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