I try to simulate Fermi-Dirac Integral and write the program below, but it so far does not work out.. I believe the problem comes from (polylog(3/2,exp((-1)* n(ind)))), and therefore polylog in matlab can operate a function or not?
n=-8:0.2:8;for ind=1:length(n) if n(ind)>=-8 Fermi(ind)=((-1)/2)*sqrt(pi)*(polylog(3/2,exp((-1)* n(ind)))); end end Ref2=semilogy(n,Fermi,'r','LineWidth',2,'LineStyle','--'); set(Ref2,'DisplayName','Ref 2');
Best Answer