rotm                 package:cwhmath                 R Documentation

_R_o_t_a_t_i_o_n _m_a_t_r_i_x

_D_e_s_c_r_i_p_t_i_o_n:

     Generate a (square) rotation matrix.

_U_s_a_g_e:

     rotm(n,x,y,phi)

_A_r_g_u_m_e_n_t_s:

       n: Order of the square matrix.

     x,y: Integers describing the plane of rotation.

     phi: Angle (counted counter clockwise) of rotation of coordinate 
          system.

_V_a_l_u_e:

     Matrix to use for pre-multiplying.

_A_u_t_h_o_r(_s):

     Christian W. Hoffmann, christian.hoffmann@wsl.ch, 
      <URL: http://www.wsl.ch/staff/christian.hoffmann>

_E_x_a_m_p_l_e_s:

       par (mfrow=c(2,2))
       Data <- rbind(rnorm(100)*100,rnorm(100)*40,rnorm(100)*5,rnorm(100)*1,rnorm(100)*0.01)
       Rotdata <- rotm(dim(Data)[1],1,2,pi/3) 
       Rotdata2 <- rotm(dim(Data)[1],2,4,pi/5) 
       plot(Data[1,],Data[2,])
       plot(Rotdata[1,],Rotdata[2,],col="red")
       points(Rotdata2[1,],Rotdata2[2,],col="blue")
       plot(Rotdata2[2,],Rotdata2[3,],col="red")
       plot(Rotdata2[4,],Rotdata2[3,],col="red")

