eps1=0;
eps2=1;
t=0.5;
H=[eps1 t; t eps2];
[EV,EE]=eig(H);
Emin=-2;
Emax=2;
dE=0.01;
Gamma=0.05;
[x,E]=meshgrid(1:6,Emin:dE:Emax);
LDOS=0.*x;
EX=E(:,1);
LDOS(:,1)=1./((EX-eps1).^2+Gamma.^2);
LDOS(:,6)=1./((EX-eps2).^2+Gamma.^2);
LDOS(:,3)=EV(1,1).^2./((EX-EE(1,1)).^2+Gamma.^2)+EV(1,2).^2./((EX-EE(2,2)).^2+Gamma.^2);
LDOS(:,4)=EV(2,1).^2./((EX-EE(1,1)).^2+Gamma.^2)+EV(2,2).^2./((EX-EE(2,2)).^2+Gamma.^2);

% LDOS(:,3)=EV(1,1)./((EX-EE(1,1)).^2+Gamma.^2)+EV(1,2)./((EX-EE(2,2)).^2+Gamma.^2);
% LDOS(:,4)=EV(2,1)./((EX-EE(1,1)).^2+Gamma.^2)+EV(2,2)./((EX-EE(2,2)).^2+Gamma.^2);


imagesc(x(1,:),EX,LDOS)

