function R = rotation_axis( deg, axis )
    % specific rotations by phi
    phi = deg/180.0*pi;
    
    % about z
    if axis == 1
      'Rotation defined about x'
        R = [cos(phi), sin(phi), 0; ...
         -sin(phi), cos(phi), 0; ...
         0, 0, 1 ];
    elseif axis == 2
        'Rotation defined about y'
         R = [cos(phi), 0, sin(phi); ...
                0, 1, 0; ...
                -sin(phi), 0, cos(phi)];
    elseif axis == 3
        'Rotation defined about z'
        R = [cos(phi), -1*sin(phi), 0; ...
            sin(phi), cos(phi), 0; ...
            0, 0, 1]; %z rotation
    else
        'Warning::Axis invalid returning identity'
        R = eye(3,3) 
    end


end

