How to calculate euclidean distance to a loaded dataset.?
8 次查看(过去 30 天)
显示 更早的评论
Sir, I have the data of 401*22double and we have to find the euclidean distance for that dataset.my dataset consists of 401 images with 22 features using pdist2 function.
5 个评论
Jan
2017-4-27
There is no need for the 2 loops, because the body of the loop does not depend on x and y.
D = pdist2(sam',data');
This looks like it could do what you want. So what is the problem?
回答(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!