Convert homogeneous transform to Euler angles
EUL = tr2zyz(TR, OPTIONS) EUL = tr2zyz(TR, OPTIONS)
compute angles in degrees (radians default)
EUL = 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 = TR2ZYZ(R, OPTIONS) are the ZYZ Euler angles expressed as a row vector corresponding to the orthonormal rotation matrix R.
If R or T represents a trajectory (has 3 dimensions), then 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).