Code covered by the BSD License  

Highlights from
slatec

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

[rsav,isav]=rsco(rsav,isav);
function [rsav,isav]=rsco(rsav,isav);
%***BEGIN PROLOGUE  RSCO
%***SUBSIDIARY
%***PURPOSE  Subsidiary to DEBDF
%***LIBRARY   SLATEC
%***TYPE      SINGLE PRECISION (RSCO-S, DRSCO-D)
%***AUTHOR  Watts, H. A., (SNLA)
%***DESCRIPTION
%
%   RSCO transfers data from arrays to a common block within the
%   integrator package DEBDF.
%
%***SEE ALSO  DEBDF
%***ROUTINES CALLED  (NONE)
%***COMMON BLOCKS    DEBDF1
%***REVISION HISTORY  (YYMMDD)
%   800901  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900328  Added TYPE section.  (WRB)
%   910722  Updated AUTHOR section.  (ALS)
%***end PROLOGUE  RSCO
%
%
%-----------------------------------------------------------------------
% THIS ROUTINE RESTORES FROM RSAV AND ISAV THE CONTENTS OF COMMON
% BLOCK DEBDF1  , WHICH IS USED INTERNALLY IN THE DEBDF
% PACKAGE.  THIS PRESUMES THAT RSAV AND ISAV WERE LOADED BY MEANS
% OF SUBROUTINE SVCO OR THE EQUIVALENT.
%-----------------------------------------------------------------------
persistent firstCall i lenils lenrls ; if isempty(firstCall),firstCall=1;end; 

if isempty(i), i=0; end;
global debdf1_2; if isempty(debdf1_2), debdf1_2=zeros(1,33); end;
if isempty(lenils), lenils=0; end;
if isempty(lenrls), lenrls=0; end;
global debdf1_1; if isempty(debdf1_1), debdf1_1=zeros(1,218); end;
rsav_shape=size(rsav);rsav=reshape(rsav,1,[]);
isav_shape=size(isav);isav=reshape(isav,1,[]);
% common :: ;
%% common /debdf1/ rls(218) , ils(33);
%% common /debdf1/ debdf1_1(218) , debdf1_2(33);
if firstCall,   lenrls=[218];  end;
if firstCall,  lenils=[33];  end;
firstCall=0;
%
%***FIRST EXECUTABLE STATEMENT  RSCO
for i = 1 : lenrls;
debdf1_1(i) = rsav(i);
end; i = fix(lenrls+1);
for i = 1 : lenils;
debdf1_2(i) = fix(isav(i));
end; i = fix(lenils+1);
%----------------------- end OF SUBROUTINE RSCO -----------------------
rsav_shape=zeros(rsav_shape);rsav_shape(:)=rsav(1:numel(rsav_shape));rsav=rsav_shape;
isav_shape=zeros(isav_shape);isav_shape(:)=isav(1:numel(isav_shape));isav=isav_shape;
end
%DECK RS

Contact us at files@mathworks.com