Unformatted text preview: %usage: [vecx vecy] = rotateLine(vx,vy,th); th = ang.*(pi./180); %converts the angle to radians A = [cos(th) -sin(th); sin(th) cos(th)]; %rotation matrix new = [vx;vy]; %new matrix is the first vector veertically concatenated with the second %vector arr = A*new; %matrix multiplication vecx = arr(1,:); %gives the x values vecy = arr(2,:); %gives the y values end...
View Full Document
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.
- Spring '08