
Kt1c=Kt1;
f1c=f1;


% sdof1=reshape(sdof1,[],1);
% sdof2=reshape(sdof2,[],1);
dof1=sdof1;
dof2=sdof2;
% sdof1=dof1(end-2:end);
% sdof2=dof2(end-2:end);
Kt1c([sdof1;constdofs1],:)=[];
Kt1c(:,[sdof1;constdofs1])=[];
f1c([sdof1;constdofs1])=[];
displ1c=(Kt1c)\f1c;
displall1=zeros(length(Kt1),1);
unconstr=(1:length(Kt1));
unconstr([sdof1;constdofs1])=[];
displall1(unconstr)=displ1c;


% pinion displ
displ1rj1=displall1(1:length(Kt1));
displ1=TRJ1*displ1rj1;
displ13=reshape(displ1(1:end-6)',3,[])';


Kt2c=Kt2;
f2c=f1;
Kt2c([sdof2;constdofs1],:)=[];
Kt2c(:,[sdof2;constdofs1])=[];
f2c([sdof2;constdofs1])=[];
displ2c=(Kt2c)\f2c;
displall2=zeros(length(Kt2),1);
unconstr=(1:length(Kt2));
unconstr([sdof2;constdofs1])=[];
displall2(unconstr)=displ2c;

% gear displ
displ2rj1=displall2(1:length(Kt2));
displ2=TRJ2*displ2rj1;
displ23=reshape(displ2(1:end-6)',3,[])';

% [~,d1]=eigs(Kt1c,10,'sm');
% [~,d2]=eigs(Kt2c,10,'sm');
% dif=d1-d2;

[scaleZ1,teta1,scaleZ2,teta2]=DisplRadCirc(g1,displ13,g2,displ23);