Unformatted text preview: xv = 7; %arbitrary x value on the original line yv = m.*xv + b; %arbitrary solution of the original line pt2 = [xv;yv]; %the second point on the line points = [pt1 pt2]; %concatenates the 2 points newMatrix = rotMatrix*points; %rotates the 2 points newm = (newMatrix(2,1)newMatrix(2,2))/(newMatrix(1,1)newMatrix(1,2)); %finds the new slope of the rotated line newb = newm.*newMatrix(1,1) + newMatrix(2,1); %finds the new yintercept of the rotated line solution = [newm 1; m 1]\[newb; b]; %augments and backdivides the two y = mx + b equations x = solution(1,1); %the x value is the 1st value y = solution(2,1); %the y value is the 2nd value end e...
View
Full Document
 Spring '08
 Stallworth
 Rotation, Original Line

Click to edit the document details