A=[-2 1; -8 2]

[U,D] = eig(A)      


a = real(D(1,1));
b = imag(D(1,1));

y1 = []; y2 = [];

for t=0:0.01:pi/2;

y1 = [ y1 (real(U(:,1))*cos(b*t) - imag(U(:,1))*sin(b*t))*exp(a*t) ];



end
for t=0:0.01:pi/2;

y2 = [ y2 (real(U(:,1))*sin(b*t) + imag(U(:,1))*cos(b*t))*exp(a*t) ];

end

figure(10)
hold on;

axis([-0.5 0.5 -1 1])
plot(y1(1,:),y1(2,:),'g');
plot(y2(1,:),y2(2,:),'r');


r=-0.5:0.05:0.5;
s=-1:0.05:1;

[x,y]=meshgrid(r,s);

u = -2 * x + y;
v = -8 * x + 2 * y;

quiver(x,y,u,v);

