This is a very simple function to compute pair-wise Euclidean distances within a vector set, from between two vector sets. Although simple, it is very useful. Using loops will be too slow.
D=distanceMatrix(X), where X is N*d data, and D is N*N distance matrix.
or D=distanceMatrix2(X,Y).
인용 양식
Quan Wang (2024). Pair-wise Euclidean Distance Matrix (https://www.mathworks.com/matlabcentral/fileexchange/45968-pair-wise-euclidean-distance-matrix), MATLAB Central File Exchange. 검색됨 .
MATLAB 릴리스 호환 정보
개발 환경:
R2013b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux카테고리
Help Center 및 MATLAB Answers에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기
태그
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!