Pairwise Distance Matrix

Compute pairwise square Euclidean or Mahalanobis distances between points sets (fully optimized!).

Download
Download

You are now following this Submission

Cite As

Mo Chen (2026). Pairwise Distance Matrix (https://se.mathworks.com/matlabcentral/fileexchange/24599-pairwise-distance-matrix), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: Pattern Recognition and Machine Learning Toolbox

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.9.0

update description

Download
1.6.0

update description

Download
1.5.0

update title and description

Download
1.4.0

remove any redundant error check

Download
1.3.0

update to support Mahalanobis distance. fix a bug for one dimensional case.

Download
1.2.0

Add a centerization step for robustness purpose. Split the code for different number of input for efficiency purpose. Update comments.

Download
1.1.0

update the description

Download
1.0.0

Download