M-File Help: eul2r | View code for eul2r

# eul2r

Convert Euler angles to rotation matrix

R = eul2r(phi, theta, psi, options) is an SO(2) orthonornal rotation matrix (3x3) equivalent to the specified Euler angles. These correspond to rotations about the Z, Y, Z axes respectively. If phi, theta, psi are column vectors (Nx1) then they are assumed to represent a trajectory and R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of phi, theta, psi.

R = eul2r(eul, options) as above but the Euler angles are taken from consecutive columns of the passed matrix eul = [phi theta psi]. If eul is a matrix (Nx3) then they are assumed to represent a trajectory and R is a three-dimensional matrix (3x3xN), where the last index corresponds to rows of eul which are assumed to be [phi, theta, psi].

## Options

'deg' | Compute angles in degrees (radians default)

## Note

- The vectors PHI, THETA, PSI must be of the same length.

## See also

eul2tr, rpy2tr, tr2eul

© 1990-2014 Peter Corke.