MKSROTATIONMATRIX(PSI) coordinate transformation matrix that describes s-rotation of the ELEMENT | cos(psi) 0 sin(psi) 0 0 0 | | 0 cos(psi) 0 sin(psi) 0 0 | | -sin(psi) 0 cos(psi) 0 0 0 | | 0 -sin(psi) 0 cos(psi) 0 0 | | 0 0 0 0 1 0 | | 0 0 0 0 0 1 | Note: AT defines 'positive' s-rotation as clockwise, looking in the dirction of the beamm
0001 function RM = mkSRotationMatrix(psi); 0002 %MKSROTATIONMATRIX(PSI) coordinate transformation matrix 0003 % that describes s-rotation of the ELEMENT 0004 % 0005 % | cos(psi) 0 sin(psi) 0 0 0 | 0006 % | 0 cos(psi) 0 sin(psi) 0 0 | 0007 % | -sin(psi) 0 cos(psi) 0 0 0 | 0008 % | 0 -sin(psi) 0 cos(psi) 0 0 | 0009 % | 0 0 0 0 1 0 | 0010 % | 0 0 0 0 0 1 | 0011 % 0012 % Note: AT defines 'positive' s-rotation as clockwise, 0013 % looking in the dirction of the beamm 0014 % 0015 0016 C = cos(psi); 0017 S = sin(psi); 0018 0019 RM = diag([ C C C C 1 1 ]); 0020 RM(1,3) = S; 0021 RM(2,4) = S; 0022 RM(3,1) = -S; 0023 RM(4,2) = -S;