This preview shows page 1. Sign up to view the full content.
Unformatted text preview: rotMatrix = [cos(th) sin(th); sin(th) cos(th)]; %rotation matrix pt1 = [0;b]; %intersect point of the original line 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)); newb = newm.*newMatrix(1,1) + newMatrix(2,1); solution = [newm 1; m 1]\[newb; b]; x = 1; y = 1; y...
View Full
Document
 Spring '08
 Stallworth

Click to edit the document details