%return a rotation matrix for phi degrees (radians)
function A = rot(phi)
    A= [cos(phi), -1 * sin(phi), 0;
        sin(phi), cos(phi), 0;
        0, 0, 1];