%% Script ora

k=1;
J=[4-k 2;-26 -17*k-8];
eig(J)
[trace(J) det(J)]

se=zeros(2,0);
kend=4;
kmin=-5;
for k=kmin:0.01:kend
    J=[4-k 2;-26 -17*k-8];
    se=[se real(eig(J))];
end

plot(kmin:0.01:kend,se','LineWidth',3);
ylim([-30 5])


figure
%ylim([-1 max(D)]);
B=zeros(2,0);
for k=kmin:0.01:kend
    J=[4-k 2;-26 -17*k-8];
    detJ=det(J);
    tJ=trace(J);
    B=[B [tJ;detJ]];
    
end
hold on


T=min(B(1,:)):0.01:max(abs(B(1,:)));
D=T.^2/4;

plot(T,D);
hold on
plot(B(1,:),B(2,:),'r');




