Skip to content

rot_3angles.m

Basic Information

  SYNTAX:
         [rot]= rot_3angles(alp,bet,gam);

  PURPOSE:
  Generate rotation tansfer function from 3 rotations:
      1) rotate alp about Z axis  => X Y Z     => X' Y' Z'
      2) rotate bet about X' axis => X' Y' Z'  => X" Y" Z"
      3) rotate gam about Z" axis => X" Y" Z"  => X"' Y"' Z"'
  The rotation matrix is the transform between X Y Z and the X"' Y"' Z"'
  The transform from global to local coordinates is:
                   [X"' Y"' Z"'] = [rot] * [X Y Z]'

  INPUT:
        alp,bet,gam= angles in degrees for rotations

  OUTPUT:
        rot=     Coordinate transform matrix [3x3] [X' Y' Z']= [rot]*[X Y Z]
                 NOTE: the transpose of rot is the reverse transform

Dependencies