The ICP (iterative closest point) algorithm finds a rigid body transformation such that a set of data points fits to a set of model points under the transformation. Default is to use least squares minimization but other criterion functions can be used as well. The implementation is based on the IRLS-ICP described in .
 Bergström, P. and Edlund, O. 2014, “Robust registration of point sets using iteratively reweighted least squares”, Computational Optimization and Applications, vol 58, no. 3, pp. 543-561, doi: 10.1007/s10589-014-9643-2
 Bergström, P. and Edlund, O. (2016) 2017, “Robust registration of surfaces using a refined iterative closest point algorithm with a trust region approach”, Numerical Algorithms, doi: 10.1007/s11075-016-0170-3
Springer Nature’s SharedIt links (full paper online access):
A demonstration of applications, where an ICP-algorithm  is implemented in Matlab and C, can be seen on YouTube
Per Bergström (2021). Iterative Closest Point Method (https://www.mathworks.com/matlabcentral/fileexchange/12627-iterative-closest-point-method), MATLAB Central File Exchange.