Function to rotate X to match Y via singular value decomposition

rotXtoY(X, Y)

Arguments

X

matrix to be rotated

Y

objective matrix

Value

rotated object Xrot, and the rotation matrix R