function []=prob_7_1_22() % % Written by: % -- % John L. Weatherwax 2006-11-21 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clc; close all; H = [ -6 -6 -7 0 7 6 6 -3 -3 0 0 -6 ; -7 2 1 8 1 2 -7 -7 -2 -2 -7 -7 ]; figure; x = H(1,:).'; y = H(2,:).'; axis( [ -20 20 -20 20 ] ); axis( 'square' ); plot( x, y, 'o' ); hold on; plot( x, y, '-' ); grid on; xlim( [ -20 20 ] ); ylim( [ -20 20 ] ); axis( 'square' ); title( 'the original house' ); A = [ 2 0 ; 0 1 ]; ah = A * H; figure; x = ah(1,:).'; y = ah(2,:).'; plot( x, y, 'o' ); hold on; plot( x, y, '-' ); grid on; xlim( [ -20 20 ] ); ylim( [ -20 20 ] ); axis( 'square' ); title( 'first A -- expands the x direction only' ); A = [ 0.7 0.7 ; 0.3 0.3 ]; ah = A * H; figure; x = ah(1,:).'; y = ah(2,:).'; plot( x, y, 'o' ); hold on; plot( x, y, '-' ); grid on; xlim( [ -20 20 ] ); ylim( [ -20 20 ] ); axis( 'square' ); title( 'second A -- collapse along a line'); A = [ 1 1 ; 0 1 ]; ah = A * H; figure; x = ah(1,:).'; y = ah(2,:).'; plot( x, y, 'o' ); hold on; plot( x, y, '-' ); grid on; xlim( [ -20 20 ] ); ylim( [ -20 20 ] ); axis( 'square' ); title( 'third A -- y component is constant');