Vous suivez désormais cette soumission
- Les mises à jour seront visibles dans votre flux de contenu suivi
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails
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
Citation pour cette source
Ben Mitch (2026). mex_sepsq (https://fr.mathworks.com/matlabcentral/fileexchange/3966-mex_sepsq), MATLAB Central File Exchange. Extrait(e) le .
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et MATLAB Answers
Informations générales
- Version 1.8.0.0 (72,9 ko)
Compatibilité avec les versions de MATLAB
- Compatible avec toutes les versions
Plateformes compatibles
- Windows
- macOS
- Linux
| Version | Publié le | Notes de version | Action |
|---|---|---|---|
| 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 |
