function svdshowf(h,A)
%SVDSHOWF used in SVDSHOW

% from Cleve Moler jul95, somewhat adapted by cb
% latest change: 17oct97

pt = get(gca,'currentpoint');
x = pt(1,1:2)';
x = x/norm(x);
y = [-x(2) x(1)]';
Ax = A*x;
Ay = A*y;
AtAx = A'*Ax/norm(Ax);
AtAy = A'*Ay/norm(Ay);
set(h(1),'xdata',[x(1) 0 y(1)],'ydata',[x(2) 0 y(2)]);
set(h(2),'xdata',[Ax(1) Ay(1)],'ydata',[Ax(2) Ay(2)]);
set(h(3),'xdata',[Ax(1) 0 Ay(1)],'ydata',[Ax(2) 0 Ay(2)]);
set(h(4),'xdata',[AtAx(1) AtAy(1)],'ydata',[AtAx(2) AtAy(2)]);
set(h(5),'xdata',[AtAx(1) 0 AtAy(1)],'ydata',[AtAx(2) 0 AtAy(2)]);

% theta = (180/pi)*acos((Ax)'*Ay/(norm(Ax)*norm(Ay)));
% pt = -(x+y)/10 - [.05 0]';
% set(h(8),'pos',pt,'string',sprintf('%4.1f',theta));
