% --------------------------------------------------------------------------------
%  MATLAB code used to generate the figures in the book:
%
%    "Quantum Transport: Atom to Transistor," by Supriyo Datta
%    published by Cambridge University Press, May 2005
%      (ISBN-10: 0521631459 | ISBN-13: 9780521631457)
%    http://www.cambridge.org/uk/catalogue/catalogue.asp?isbn=0521631459
%
% THIS FILE FOR: support function used in Figures 7.2.5, 7.3.1
%
% --------------------------------------------------------------------------------
% Copyright (c) 2005  Supriyo Datta
% --------------------------------------------------------------------------------

function y=Fhalf(x)
xx=linspace(0,abs(x)+10,251);dx=xx(2)-xx(1);
fx=(2*dx/sqrt(pi))*sqrt(xx)./(1+exp(xx-x));
y=sum(fx);
end