I have a homework assignment, and I am asked to rotate a vector (v) by the rotation matrix (M), by any angle (x) in a counter clockwise direction, then show that M'x rotates the vector back to the original position.
My code looks like this:
%theta=x
%R=M
v=[100 100]x=45R=[cosd(x) -sind(x);sind(x) cosd(x)]vR=v*Rquiver(0,0,v(1),v(2))hold onquiver(0,0,vR(1),vR(2))S=R'vS=v*Squiver(0,0,v(1),v(2))hold onquiver(0,0,vS(1),vS(2))
My plot looks like this:
Best Answer