function myeig
global M F H S w m killa killb nkeep nrem nods;
global VECTOR eigvalue GrowRate MigSpeed LEN;
global textwin textwinHndl;

J=M\(w*(F-H)-S);
[vector,value]=eig(full(J));
eigvalue=diag(value);
[Y,ind]=sort(real(eigvalue));
LEN=length(ind);
vector=vector(:,ind(LEN:-1:1));
eigvalue=eigvalue(ind(LEN:-1:1));  % from largest to smallest eigv
VECTOR=[];
VECTOR(nods,:)=vector;       % complete full eig vectors
VECTOR([killa killb],:)=0;   % antisym surface T=0
VECTOR(nrem,:)=VECTOR(nkeep,:);
GrowRate=real(eigvalue(1));
if m==0
   MigSpeed=0;
else
   MigSpeed=abs(imag(eigvalue(1))/m); 
%%   MigSpeed=min([w-MigSpeed,MigSpeed]);
end;
textwin{length(textwin)+1}=sprintf(...
' N=%d, Sliding Speed=%8.2e, Growth=%9.2e, Mig=%8.3e',...
m,w,GrowRate,MigSpeed);
set(textwinHndl,'string',textwin,'listboxtop',length(textwin));drawnow;


