% reads an angle fi from the slider
% plots the vectors x=[cos(fi);sin(fi)] and y=Ax
% 990901 /stig 

% A=[1 2 ; 2 1];      % symmetric matrix
% A=[0 1 ; -4 0];     % imaginary eigenvalues

xmax=5;

fi = 4*pi*get(drag,'Value');

x=[cos(fi);sin(fi)]               % a unit vector
y=A*x;
lambda=x'*A*x

plot(0,0,'o')                     % plot the origin
hold on
plot(x(1),x(2),'xr')              % plot the point x
plot([0, x(1)], [0, x(2)],'r')    % plot the vector x

plot(y(1),y(2),'xk')
plot([0, y(1)], [0, y(2)],'k')

axis([-xmax xmax -xmax xmax])

hold off
