function e = cleanPolesAtInfinity(e,zerotol)
% In QZ decomposition, zero out negligible diagonal entries of E to keep 
% infinite poles at s=Inf. 
% Note: Assumes E is upper triangular.

%   Copyright 2020 The MathWorks, Inc. 
nx = size(e,1);
for ct=1:nx
   if abs(e(ct,ct))<zerotol
      e(ct,ct) = 0;
   end
end
