mex_sepsq

버전 1.8.0.0 (72.9 KB) 작성자: Ben Mitch
Fast, dedicated, code to compute Euclidean separation between sets of points in N-dimensional space.
다운로드 수: 2.2K
업데이트 날짜: 2010/11/22

라이선스 보기

To compute the Euclidean separation (L2 norm) between two sets of points in MATLAB can be slow and/or memory-hungry. In some cases (most particularly, if you are working with 2D, 3D or 4D data), this function will do it 2-4 times faster than the fastest m-code I've seen (due to Germano Gomes) and hundreds of times faster than a typical memory-efficient nested loop.

NB: for D much greater than 10-15, performance is better using GG's m-script. See the screenshot for a performance plot - green is GG, blue is mex_sepsq.

>> mex_sepsq_demo

A = randn(4, 5000);
B = randn(4, 5000);

C1 = mex_sepsq(A, B);
Elapsed time is 0.201335 seconds.

C2 = sepsq_gg(A, B);
Elapsed time is 0.517755 seconds.

Relative time per implementation: 1.00 2.57

인용 양식

Ben Mitch (2024). mex_sepsq (https://www.mathworks.com/matlabcentral/fileexchange/3966-mex_sepsq), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2010a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB 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!
버전 게시됨 릴리스 정보
1.8.0.0

whoops, broke the linux implementation - fixed, now.

1.7.0.0

Improved performance, added benchmarking.

1.2.0.0

Provided a demo and an auto-compile script.

1.0.0.0