# HG changeset patch # User Mike Miller # Date 1367192110 14400 # Node ID 4d2b0104ee05ab2f9f7a849a29b7ff5edcc396bc # Parent a3fdd6041e6486d08ce0a56556fa5d229cba7cf5 Add argument to ellipj for Matlab compatibility * ellipj.cc: Allow third argument for compatibility, ignored for now. diff -r a3fdd6041e64 -r 4d2b0104ee05 libinterp/corefcn/ellipj.cc --- a/libinterp/corefcn/ellipj.cc Sun Apr 28 19:25:50 2013 -0400 +++ b/libinterp/corefcn/ellipj.cc Sun Apr 28 19:35:10 2013 -0400 @@ -136,7 +136,8 @@ DEFUN (ellipj, args, nargout, "-*- texinfo -*-\n\ -@deftypefn {Built-in Function} {[@var{sn}, @var{cn}, @var{dn}, @var{err}] =} ellipj (@var{u}, @var{m})\n\ +@deftypefn {Built-in Function} {[@var{sn}, @var{cn}, @var{dn}, @var{err}] =} ellipj (@var{u}, @var{m})\n\ +@deftypefnx {Built-in Function} {[@var{sn}, @var{cn}, @var{dn}, @var{err}] =} ellipj (@var{u}, @var{m}, @var{tol})\n\ Compute the Jacobi elliptic functions @var{sn}, @var{cn}, and @var{dn}\n\ of complex argument @var{u} and real parameter @var{m}.\n\ \n\ @@ -150,6 +151,9 @@ The value of @var{u} may be complex.\n\ The value of @var{m} must be 0 <= m <= 1.\n\ \n\ +@var{tol} is currently ignored (@sc{Matlab} uses this to allow faster,\n\ +less accurate approximation).\n\ +\n\ If requested, @var{err} contains the following status information\n\ and is the same size as the result.\n\ \n\ @@ -170,7 +174,7 @@ int nargin = args.length (); - if (nargin != 2 ) + if (nargin < 2 || nargin > 3) { print_usage (); return retval;