Code covered by the BSD License  

Highlights from
slatec

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

[numxerresult,nerr]=numxer(nerr);
function [numxerresult,nerr]=numxer(nerr);
numxerresult=[];
persistent numxer ; 

if isempty(numxerresult), numxerresult=0; end;
%***BEGIN PROLOGUE  NUMXER
%***PURPOSE  Return the most recent error number.
%***LIBRARY   SLATEC (XERROR)
%***CATEGORY  R3C
%***TYPE      INTEGER (NUMXER-I)
%***KEYWORDS  ERROR NUMBER, XERROR
%***AUTHOR  Jones, R. E., (SNLA)
%***DESCRIPTION
%
%     Abstract
%        NUMXER returns the most recent error number,
%        in both NUMXER and the parameter NERR.
%
%***REFERENCES  R. E. Jones and D. K. Kahaner, XERROR, the SLATEC
%                 Error-handling Package, SAND82-0800, Sandia
%                 Laboratories, 1982.
%***ROUTINES CALLED  J4SAVE
%***REVISION HISTORY  (YYMMDD)
%   790801  DATE WRITTEN
%   891214  Prologue converted to Version 4.0 format.  (BAB)
%   900402  Added TYPE section.  (WRB)
%   910411  Made user-callable and added KEYWORDS section.  (WRB)
%   920501  Reformatted the REFERENCES section.  (WRB)
%***end PROLOGUE  NUMXER
%***FIRST EXECUTABLE STATEMENT  NUMXER
[nerr ]=j4save(1,0,false);
numxerresult = fix(nerr);
csnil=dbstack(1); csnil=csnil(1).name(1)~='@';
if csnil&&~isempty(inputname(1)), assignin('caller','FUntemp',nerr); evalin('caller',[inputname(1),'=FUntemp;']); end
end
%DECK OHTROL

Contact us