You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
My one-line implementation of both MATLAB's pdist and pdist2 functions which compute the univariate (pdist) or bivariate (pdist2) Euclidean distances between all pairs of input observations. This function can do both - it will function like pdist if only one set of observations is provided and will function like pdist2 if two sets of obsrvations are provided. Additional input arguments are NOT supported such as alternative distance metrics.
GitHub: https://github.com/andrewsoltisz/pdist-one-line/tree/main
Cite As
Andrew M. Soltisz (2026). pdist_oneLine (https://www.mathworks.com/matlabcentral/fileexchange/136559-pdist_oneline), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.0.2 (3.04 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
