function transform_vectors ( A, p )

%% transform_vectors.m

q = A * p;
[m,n] = size ( p );

clf
hold on
for j = 1 : n
  quiver ( p(1,j), p(2,j), q(1,j) - p(1,j), q(2,j) - p(2,j), 'g', 'Linewidth', 3 );
  quiver ( 0, 0, p(1,j), p(2,j), 'b-', 'Linewidth', 3 );
  quiver ( 0, 0, q(1,j), q(2,j), 'r-', 'Linewidth', 3 );
end
%plot ( [ -10, +10 ], [ 0, 0 ], 'k:', 'Linewidth', 2 );
%plot ( [  0,  0 ], [ -10, +10 ], 'k:', 'Linewidth', 2 );
grid on
title ( 'Transform vectors', 'Fontsize', 24 );
%axis ( [ -10, +10, -10, +10 ] );
axis equal
%axis square
hold off
print ( '-djpeg', 'transform_vectors.jpg' );
