function [r1,r2]=eigs(T,I)
% eigs - Return selected eigs relative to order by magnitude
%
% eigs :: [[N,N]], [[M]->[N]] ~'M indices between 1 and N' -> [[M]].
% eigs :: [[N,N]], [[M]->[N]] ~'M indices between 1 and N' -> [[N,M]], [[M]].

if nargout==1
	L0=eig(T);
	[dummy,ord]=sort(-abs(L0));
	r1=L0(ord(I));
else
	[V0,D0]=eig(T); L0=diag(D0);
	[dummy,ord]=sort(-abs(L0));
	r1=V0(:,ord(I));
	r2=L0(ord(I));
end
