How to use pdist to get the distance separately?
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone, I got a question when using pdist function in Matlab, it would be so many thanks if you could give me some advice. The pdist(D) usually gives the sum of the distance of the multiple dimension (Euclidean distance), however, I want to get the distance separately. For example I have a data set S which is a 10*2 matrix , by using pdist(S(:,1)) and pdist(S(:,2)) to get the distance separately, but this seems very inefficient when the data has many dimensions. Is there any alternative way to achieve this more efficient? Thanks in advance!
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File 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!