Code covered by the BSD License  

Highlights from
slatec

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

[i,ir,idxc,nc]=indxc(i,ir,idxc,nc);
function [i,ir,idxc,nc]=indxc(i,ir,idxc,nc);

global cblkt_4; if isempty(cblkt_4), cblkt_4=0; end;
global cblkt_3; if isempty(cblkt_3), cblkt_3=0; end;
global cblkt_7; if isempty(cblkt_7), cblkt_7=0; end;
global cblkt_2; if isempty(cblkt_2), cblkt_2=0; end;
global cblkt_6; if isempty(cblkt_6), cblkt_6=0; end;
global cblkt_5; if isempty(cblkt_5), cblkt_5=0; end;
global cblkt_1; if isempty(cblkt_1), cblkt_1=0; end;
%***BEGIN PROLOGUE  INDXC
%***SUBSIDIARY
%***PURPOSE  Subsidiary to BLKTRI
%***LIBRARY   SLATEC
%***TYPE      INTEGER (INDXC-I)
%***AUTHOR  (UNKNOWN)
%***SEE ALSO  BLKTRI
%***ROUTINES CALLED  (NONE)
%***COMMON BLOCKS    CBLKT
%***REVISION HISTORY  (YYMMDD)
%   801001  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900402  Added TYPE section.  (WRB)
%***end PROLOGUE  INDXC
% common :: ;
%% common /cblkt / npp , k , eps , cnv , nm , ncmplx , ik;
%% common /cblkt / cblkt_1 , cblkt_2 , cblkt_3 , cblkt_4 , cblkt_5 , cblkt_6 , cblkt_7;
%***FIRST EXECUTABLE STATEMENT  INDXC
nc = fix(2.^ir);
idxc = fix(i);
if( idxc+nc-1>cblkt_5 )
nc = 0;
end;
end
%DECK INITDS

Contact us at files@mathworks.com