ICP fit points in data to the points in model. Fit with respect to minimize the sum of square errors with the closest model points and data points.
[R, T] = icp(model,data)
model - matrix with model points,
data - matrix with data points,
R - rotation matrix and
T - translation vector accordingly