MATLAB: Polylog as a function of x

henryMATLAB

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

There are two File Exchange functions that calculate the polylogarithm. I cannot find any built-in MATLAB* functions to calculate it.