changeset 16588:4d2b0104ee05

Add argument to ellipj for Matlab compatibility * ellipj.cc: Allow third argument for compatibility, ignored for now.
author Mike Miller <mtmiller@ieee.org>
date Sun, 28 Apr 2013 19:35:10 -0400
parents a3fdd6041e64
children fe6beca15813
files libinterp/corefcn/ellipj.cc
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;