Code covered by the BSD License  

Highlights from
slatec

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

[dsosfnresult,x,k]=dsosfn(x,k);
function [dsosfnresult,x,k]=dsosfn(x,k);
dsosfnresult=[];

;
if( k==1 )
dsosfnresult = 1.0d0 - x(1);
end;
if( k==2 )
dsosfnresult = 1.0d1.*(x(2)-x(1).^2);
end;
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',x); evalin('caller',[inputname(1),'=FUntemp;']); end
if csnil&&~isempty(inputname(2)), assignin('caller','FUntemp',k); evalin('caller',[inputname(2),'=FUntemp;']); end
end %function dsosfn

Contact us