rotm {cwhmath} | R Documentation |
Generate a (square) rotation matrix.
rotm(n,x,y,phi)
n |
Order of the square matrix. |
x,y |
Integers describing the plane of rotation. |
phi |
Angle (counted counter clockwise) of rotation of coordinate system. |
Matrix to use for pre-multiplying.
Christian W. Hoffmann, christian.hoffmann@wsl.ch,
http://www.wsl.ch/staff/christian.hoffmann
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")