I have created two 5×3 column vectors. One with 5 points with respect to coordinate axis 1 and the other with the same 5 points but with respect to coordinate axis 2.

If correct, how should I proceed please?

The code you’ve provided should provide the transform matrix that translates and rotates the points from axis 1 to axis 2. Can you confirm please?

]]>My question is that how to extract the 3D rotation values instead of matrix?

]]>Perfect !!

Your short program solved my problem, but what I really know to appreciate is your explanation, nicely written easy to understand.

Congratulations !!

If so, how would that affect the rotation since the rotation would not be around centroid_A but instead around P?

]]>I’d like to make a rotation about a single axis and perform the rest of the transform through translation for a 3D space. Do you know any way I could modify the matlab code to go through this? I understand that it’s not finding the optimal positioning but I’d like to place the constrains on the object that is represented by the data points.

Thanks!

]]>