Code covered by the BSD License  

Highlights from
slatec

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

[l,v]=bdiff(l,v);
function [l,v]=bdiff(l,v);
%***BEGIN PROLOGUE  BDIFF
%***SUBSIDIARY
%***PURPOSE  Subsidiary to BSKIN
%***LIBRARY   SLATEC
%***TYPE      SINGLE PRECISION (BDIFF-S, DBDIFF-D)
%***AUTHOR  Amos, D. E., (SNLA)
%***DESCRIPTION
%
%     BDIFF computes the sum of B(L,K)*V(K)*(-1)**K where B(L,K)
%     are the binomial coefficients.  Truncated sums are computed by
%     setting last part of the V vector to zero. On return, the binomial
%     sum is in V(L).
%
%***SEE ALSO  BSKIN
%***ROUTINES CALLED  (NONE)
%***REVISION HISTORY  (YYMMDD)
%   820601  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900328  Added TYPE section.  (WRB)
%***end PROLOGUE  BDIFF
persistent i j k ; 

if isempty(i), i=0; end;
if isempty(j), j=0; end;
if isempty(k), k=0; end;
v_shape=size(v);v=reshape(v,1,[]);
%***FIRST EXECUTABLE STATEMENT  BDIFF
if( l==1 )
v_shape=zeros(v_shape);v_shape(:)=v(1:numel(v_shape));v=v_shape;
return;
end;
for j = 2 : l;
k = fix(l);
for i = j : l;
v(k) = v(k-1) - v(k);
k = fix(k - 1);
end; i = fix(l+1);
end; j = fix(l+1);
v_shape=zeros(v_shape);v_shape(:)=v(1:numel(v_shape));v=v_shape;
end
%DECK BESI0E

Contact us at files@mathworks.com