Code covered by the BSD License  

Highlights from
slatec

from slatec by Ben Barrowes
The slatec library converted into matlab functions.

[aliresult,x]=ali(x);
function [aliresult,x]=ali(x);
aliresult=[];
persistent ali ; 

if isempty(aliresult), aliresult=0; end;
%***BEGIN PROLOGUE  ALI
%***PURPOSE  Compute the logarithmic integral.
%***LIBRARY   SLATEC (FNLIB)
%***CATEGORY  C5
%***TYPE      SINGLE PRECISION (ALI-S, DLI-D)
%***KEYWORDS  FNLIB, LOGARITHMIC INTEGRAL, SPECIAL FUNCTIONS
%***AUTHOR  Fullerton, W., (LANL)
%***DESCRIPTION
%
% ALI(X) computes the logarithmic integral; i.e., the
% integral from 0.0 to X of (1.0/ln(t))dt.
%
%***REFERENCES  (NONE)
%***ROUTINES CALLED  EI, XERMSG
%***REVISION HISTORY  (YYMMDD)
%   770601  DATE WRITTEN
%   890531  Changed all specific intrinsics to generic.  (WRB)
%   890531  REVISION DATE from Version 3.2
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900315  CALLs to XERROR changed to CALLs to XERMSG.  (THJ)
%   900326  Removed duplicate information from DESCRIPTION section.
%           (WRB)
%***end PROLOGUE  ALI
%***FIRST EXECUTABLE STATEMENT  ALI
if( x<=0.0 )
xermsg('SLATEC','ALI','LOG INTEGRAL UNDEFINED FOR X LE 0',1,2);
end;
if( x==1.0 )
xermsg('SLATEC','ALI','LOG INTEGRAL UNDEFINED FOR X = 1',2,2);
end;
%
[aliresult ]=ei(log(x));
%
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',x); evalin('caller',[inputname(1),'=FUntemp;']); end
end
%DECK ALNGAM

Contact us at files@mathworks.com