diff scripts/deprecated/isequalwithequalnans.m @ 16935:a7b2fc7fe1a9

binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1. * scripts/statistics/distributions/binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
author Rik <rik@octave.org>
date Tue, 09 Jul 2013 14:39:39 -0700
parents scripts/general/isequalwithequalnans.m@f3d52523cde1
children d63878346099
line wrap: on
line diff
copy from scripts/general/isequalwithequalnans.m
copy to scripts/deprecated/isequalwithequalnans.m
--- a/scripts/general/isequalwithequalnans.m
+++ b/scripts/deprecated/isequalwithequalnans.m
@@ -18,18 +18,22 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{})
-## Assuming NaN == NaN, return true if all of @var{x1}, @var{x2}, @dots{}
-## are equal.
-## @seealso{isequal}
+## This function has been deprecated.  Use @code{@file{isequaln}} instead.
+## @seealso{isequaln}
 ## @end deftypefn
 
-function retval = isequalwithequalnans (x1, varargin)
+## Deprecated in 3.8
+
+function retval = isequalwithequalnans (varargin)
 
-  if (nargin < 2)
-    print_usage ();
+  persistent warned = false;
+  if (! warned)
+    warned = true;
+    warning ("Octave:deprecated-function",
+             "isequalwithequalnans is obsolete and will be removed from a future version of Octave, please use isequaln instead");
   endif
 
-  retval = __isequal__ (true, x1, varargin{:});
+  retval = isequaln (varargin{:});
 
 endfunction