Code covered by the BSD License  

Highlights from
slatec

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

[x,g]=dgvec(x,g);
function [x,g]=dgvec(x,g);
%***BEGIN PROLOGUE  DGVEC
%***PURPOSE  Subsidiary to
%***LIBRARY   SLATEC
%***AUTHOR  (UNKNOWN)
%***ROUTINES CALLED  (NONE)
%***REVISION HISTORY  (YYMMDD)
%   ??????  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%***end PROLOGUE  DGVEC

g_shape=size(g);g=reshape(g,1,[]);
%***FIRST EXECUTABLE STATEMENT  DGVEC
g(1) = 0.0d0;
g(2) = 1.0d0 + cos(x);
g_shape=zeros(g_shape);g_shape(:)=g(1:numel(g_shape));g=g_shape;
end
%DECK DH12

Contact us at files@mathworks.com