
clear;G=[1,1;1,1];%For Section 11-9.1.
F1=[1.1 0.1;0.1 1.0];F2=[0.1 1;1 0.1];F3=[1 0.1;0 0.9];F4=[0 0.9;1.1 0.1];F5=[1.1 1;0.9 1];
F=[F1(:) F2(:) F3(:) F4(:) F5(:)];%Training matrix
[U S V]=svd(F);c=U(:,1:2)'*F;g=U(:,1:2)'*G(:);diag(S)%Singular values 
figure,plot(c(1,:),c(2,:),'b+'),hold,plot(g(1,:),g(2,:),'r+')
