function []=prob_6_4_27(A) % % % 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. % %----- format long A = [ 1 1 1 1 1 ; 1 2 3 4 5 ]; disp( '>>>>> A^T * A is' ); (A.')*A disp( '>>>>> this matrix is singular ... selecting linearly independent columns gives' ); A = A(:,1:2) disp( '>>>>> now P is' ); P = A*inv((A.')*A)*(A.') disp( '>>>>> the requested eig call returns' ); [S,LAMBDA] = eig(P) (S.') * S