No BSD License  

Highlights from
MATLAB for Engineers

from MATLAB for Engineers by Adrian Biran
Companion Software

eulangle(psi, theta, phi)
   function D = eulangle(psi, theta, phi)

%EULANGLE matrix of rotations by Euler's angles.
%         EULANGLE(psi, theta, phi) yields the matrix of
%         rotation of a system of coordinates by Euler's
%         angles psi, theta, and phi, measured in degrees.
%         This functions assumes the availability of functions
%         SIND and COSD.

A = [   cosd(psi)      sind(psi)       0
       -sind(psi)      cosd(psi)       0
        0              0               1 ];
B = [   1              0               0
        0              cosd(theta)     sind(theta)
        0             -sind(theta)     cosd(theta) ];
C = [   cosd(phi)      sind(phi)       0
       -sind(phi)      cosd(phi)       0
        0              0               1 ];
D = C*B*A;

Contact us at files@mathworks.com