MATLAB: How to get rotation matrix from 3d points

rotationvector

I have 3 3d points and I need to find rotation matrix from these points.
P1(-401.428, 485.929, 772.921)
P2(-21.4433, 475.611, 772.511)
P3(-400.982, 483.56, 403.703)
How could I compute 3×3 rotation matrix? They are orthogonal. And I set P1 as a reference point.

Best Answer

All the rotation matrix are orthogonal. To find rotation matrix for each axis please refer rotx. For more information about Matrix rotation refer this link.