Pairwise distance between 2 group of vectors (multidimensional)

Find pair-wise WEIGHTED SQUARE EUCLIDEAN distance distance between 2 group of vectors

You are now following this Submission

% Find pair-wise SQUARE EUCLIDEAN distance
% or 'Weighted square euclidean' distance
% between each point in A and B
% For 2 vector a, b
% Euclidean distance= d = sum((a-b).^2)
% Weighted version = d = sum(wts.*(a-b).^2)
% ------------------------------
% Input:
% A= m_by_p, m points in p-dimension
% B= n_by_p, n points in p-dimension
% Wts = 1_by_p, defaut = [1 1 ...]
% Results:
% DD= m_by_n
% ------------------------------
% Facts: (a-b)^2= a^2+b^2-2ab
% ------------------------------
% trungd@okstate.edu, Feb 2011
% ------------------------------
% Ideal from: Piotr Dollar. [pdollar-at-caltech.edu]

See more detail at my blog: http://trunghuyduong.blogspot.com/2011/09/pair-wise-weighted-euclidean-distance.html

Cite As

Trung Duong (2026). Pairwise distance between 2 group of vectors (multidimensional) (https://se.mathworks.com/matlabcentral/fileexchange/33017-pairwise-distance-between-2-group-of-vectors-multidimensional), MATLAB Central File Exchange. Retrieved .

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.0.0.0