Euclidean distance between two point clouds

Given point cloud A and B, get the euclidean distance of every point in B to the nearest point in A.
1.3K Downloads
Updated 1 Oct 2016

View License

% Calculate the euclidean distance for every point in sample point cloud to
% the closest point in the reference point cloud (number of columns must
% match)
% INPUT:
% reference = M x N matrix
% sample = P x N matrix

% OUTPUT:
% distMat = P x N matrix

Cite As

Audrey Cheong (2026). Euclidean distance between two point clouds (https://www.mathworks.com/matlabcentral/fileexchange/59377-euclidean-distance-between-two-point-clouds), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0