MATLAB: Fitting 3-dimensional datasets

lsqnonlin fit scale

I would like to fit one 3d dataset to another. I used lsqnonlin for this purpose, but I noticed, that the three axes are scaled differently. As a result i would like a matrix consisting of the rotation, translation and a (on all three axes equal) scale. Can anyone tell me which function I should use?

Best Answer

A little more searching lead me to the answer:
[d,Z,transform] = procrustes(X,Y)
is the function I was searching for.