Convert homogeneous transform to Euler angles
EUL = rts_c_tr2zyz(TR, OPTIONS)
compute angles in degrees (radians default)
EUL = RTS_C_TR2ZYZ(TR, OPTIONS) are the ZYZ Euler angles expressed as a row vector corresponding to the rotational part of a homogeneous transform TR. The 3 angles EUL=[PHI,THETA,PSI] correspond to sequential rotations about the Z, Y and Z axes respectively.
EUL = RTS_C_TR2ZYZ(R, OPTIONS) are the ZYZ Euler angles expressed as a row vector corresponding to the orthonormal rotation matrix R.
If R has (3*n) columns or T has (4*n) columns, they are interpreted as a trajectory of n elements. Each row of EUL corresponds to a step of the trajectory.
There is a singularity for the case where THETA=0 in which case PHI is arbitrarily set to zero and PSI is the sum (PHI+PSI).