Dcm2euler.m

From Spinach Documentation Wiki
Jump to: navigation, search

Converts DCM into Euler angles (Varshalovich B convention). Syntax:

                    [alpha,beta,gamma]=dcm2euler(dcm)
                                   OR
                          angles=dcm2euler(dcm)

In the latter case, anglews is a row vector containing the three Euler angles, ordered as [alpha beta gamma].

Note: The problem of recovering Euler angles from a DCM is in general ill-posed. The function below is a product of very considerable amount of thought and has has passed rigorous testing. In all cases it either returns a correct answer or gives an informative error message.