This preview shows page 1. Sign up to view the full content.
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
This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.
 Spring '08
 Stallworth

Click to edit the document details