pair wise distance matric

1 次查看(过去 30 天)
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
Hi,
you can use squareform:
X = randn(10, 2);
D = squareform(pdist(X));

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by