% THERE ARE ERRORS
theta = pi/180*50;
Rz = [cos(theta), -sin(theta), 0;
sin(theta), cos(theta), 0;
0, 0, 1];
Rz
phi = pi/180*45
Ry = [cos(phi), 0, sin(phi);
0,        1, 0;
-sin(phi), 0, cos(phi)];
Ry
Rz * Ry
Ry * Rz
psi = pi/180*30
Rx = [1, -sin(psi), cos(psi);
Rx = [1, 0, 0;
0, cos(psi), -sin(psi);
0, sin(psi), cos(psi)];
Rx
Rx*Ry*Rz
R = Rx*Ry*Rz
R*R'
R'*R
R