% % Data points for the final exam MAT 342, Fall 1996 % p=[1 -2; 1 0; 5 0; 2 4; 3 4; 0 7; -3 4; -2 4; -4 1; -4 0; -1 0; -1 -2; 1 -2]' q=[24 5;20 5;20 9;12 6;12 7; 6 4; 12 1; 12 2; 18 0; 20 0; 20 3; 24 3;24 5]' % % ffill(p,'g') hold on ffill(q,[.5 .3 0]) grid % % % % disp('strike any key to continue') pause % % % disp('Hint: Given a 2x2-matrix A and a 2x2 vector v, draw the') disp(' image of the polygon p under the map x --> Ax+v ') disp(' using the following commands -- just an example.') % A=[2 0;0 .6] v=[0;-10] % disp('You need to make v into a matrix of the same size as p') disp('strike any key to continue') pause disp('Overlay the new plot -- look at the graphics window!') % % disp(' ') echo on vv=diag(v')*ones(size(p)) ffill(A*p+vv,'b') echo off disp(' ') disp(' ') % disp('Trial and error solutions will not earn credit. You need') disp('to demonstrate how to use linear algebra effectively to') disp('find the matrix A and the vector v such that x --> Ax+v') disp('maps the green tree into the given brown one.')