clear
format long
K1=1.1606;
K2=1.2549;
K3=0.2734;
K4=2.4648;
K5=-0.4991;
K6=0.5177;
M=11.12;
f=50;
Td0=6.542;
Ke=200;
Te=0.05;
Ksi=[-100:1:100];
T2=0.05;
T4=0.05;
T1=0.096;
T3=0.096;
Tw=10;
for i=1:200
   Ks=Ksi(i);
Abuku=[0 -K1/M -K2/M	0 0 0 0;
   2*pi*f 0 0 0 0 0 0;
   0 -K4/Td0	-1/(Td0*K3) 1/Td0	 0 0 0;
   0 -Ke*K5/Te -Ke*K6/Te -1/Te 0 0 Ke/Te;
   Ks/T2 -Ks*K1*T1/(T2*M) -Ks*K2*T1/(T2*M) 0 -1/T2 0 0;
   Ks*T3/(T2*T4) -Ks*K1*T1*T3/(T2*T4*M) -Ks*K2*T1*T3/(T2*T4*M) 0 (1/T4)-(T3/(T2*T4)) -1/T4 0;
   Ks*T3/(T2*T4) -Ks*K1*T1*T3/(T2*T4*M) -Ks*K2*T1*T3/(T2*T4*M) 0 (1/T4)-(T3/(T2*T4)) -1/T4 -1/Tw];
Akita=[0 -K1/M -K2/M	0 0 0 0;
   2*pi*f 0 0 0 0 0 0;
   0 -K4/Td0	-1/(Td0*K3) 1/Td0	 0 0 0;
   Ks*Ke*T1*T3/(Te*T2*T4) -Ke*K5/Te -Ke*K6/Te -1/Te Ke*T1*T3/(Te*T2*T4) Ke*T3/(Te*T4) Ke/Te;
   -Ks/Tw 0 0 0 -1/Tw 0 0;
   (Ks/T2)*(1-(T1/T2)) 0 0 0 (1/T2)*(1-(T1/T2)) -1/T2 0;
   (Ks*T1/(T2*T4))*(1-(T3/T4)) 0 0 0 (T1/T2)*((1-(T3/T4))/T4) ((1-(T3/T4))/T4) -1/T4];
lambbuku=eig(Abuku);
lambkita=eig(Akita);
for j=1:7
   Lb(i,j)=lambbuku(j);
   Lbr(i,j)=real(Lb(i,j));
   Lbi(i,j)=imag(Lb(i,j));
   Lk(i,j)=lambkita(j);
   Lkr(i,j)=real(Lk(i,j));
   Lki(i,j)=imag(Lk(i,j));
   K=i
   clc
end
end
plot(Lb,'*'), grid on
pause
clg
plot(Lk,'o'), grid on
