Code covered by the BSD License  

Highlights from
slatec

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

[rsav,isav]=svco(rsav,isav);
function [rsav,isav]=svco(rsav,isav);
%***BEGIN PROLOGUE  SVCO
%***SUBSIDIARY
%***PURPOSE  Subsidiary to DEBDF
%***LIBRARY   SLATEC
%***TYPE      SINGLE PRECISION (SVCO-S, DSVCO-D)
%***AUTHOR  (UNKNOWN)
%***DESCRIPTION
%
%   SVCO transfers data from a common block to arrays 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)
%***end PROLOGUE  SVCO
%
%
%-----------------------------------------------------------------------
% THIS ROUTINE STORES IN RSAV AND ISAV THE CONTENTS OF COMMON BLOCK
% DEBDF1  , WHICH IS USED INTERNALLY IN THE DEBDF PACKAGE.
%
% RSAV = REAL ARRAY OF LENGTH 218 OR MORE.
% ISAV = INTEGER ARRAY OF LENGTH 33 OR MORE.
%-----------------------------------------------------------------------
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  SVCO
for i = 1 : lenrls;
rsav(i) = debdf1_1(i);
end; i = fix(lenrls+1);
for i = 1 : lenils;
isav(i) = fix(debdf1_2(i));
end; i = fix(lenils+1);
%----------------------- end OF SUBROUTINE SVCO -----------------------
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 SVD

Contact us at files@mathworks.com