Mercurial > hg > octave-nkf
annotate scripts/deprecated/isequalwithequalnans.m @ 18189:d638db6d045c stable
doc: Note that dbstop can be used with class methods as well (bug #40958).
* debug.txi: Note that dbstop can be used with class methods as well
(bug #40958).
author | Rik <rik@octave.org> |
---|---|
date | Wed, 01 Jan 2014 18:24:55 -0800 |
parents | d63878346099 |
children | bcf0a288aa6c |
rev | line source |
---|---|
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
16935
diff
changeset
|
1 ## Copyright (C) 2005-2013 William Poetra Yoga Hadisoeseno |
5549 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
7016 | 5 ## Octave is free software; you can redistribute it and/or modify it |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
5549 | 9 ## |
7016 | 10 ## Octave is distributed in the hope that it will be useful, but |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
5549 | 14 ## |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
5549 | 18 |
19 ## -*- texinfo -*- | |
5550 | 20 ## @deftypefn {Function File} {} isequalwithequalnans (@var{x1}, @var{x2}, @dots{}) |
16935
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
21 ## This function has been deprecated. Use @code{@file{isequaln}} instead. |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
22 ## @seealso{isequaln} |
5549 | 23 ## @end deftypefn |
24 | |
16935
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
25 ## Deprecated in 3.8 |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
26 |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
27 function retval = isequalwithequalnans (varargin) |
5549 | 28 |
16935
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
29 persistent warned = false; |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
30 if (! warned) |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
31 warned = true; |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
32 warning ("Octave:deprecated-function", |
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
33 "isequalwithequalnans is obsolete and will be removed from a future version of Octave, please use isequaln instead"); |
5550 | 34 endif |
5549 | 35 |
16935
a7b2fc7fe1a9
binocdf.m: Reverse calling convention to betaincinv to preserve accuracy when p =~ 1.
Rik <rik@octave.org>
parents:
14363
diff
changeset
|
36 retval = isequaln (varargin{:}); |
12604
132c89bb44e3
maint: Refactor general/isXXX.m scripts to put input validation first.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
37 |
5549 | 38 endfunction |
39 | |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
40 |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
41 ## test for equality |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
42 %!assert (isequalwithequalnans ({1,2,NaN,4},{1,2,NaN,4}), true) |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
43 %!assert (isequalwithequalnans ([1,2,NaN,4],[1,2,NaN,4]), true) |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
44 ## test for inequality |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
45 %!assert (isequalwithequalnans ([1,2,NaN,4],[1,NaN,3,4]), false) |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
46 %!assert (isequalwithequalnans ([1,2,NaN,4],[1,2,3,4]), false) |
9899
9f25290a35e8
more private function and subfunction changes
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
47 ## test for equality (struct) |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
48 %!assert (isequalwithequalnans (struct ('a',NaN,'b',2),struct ('a',NaN,'b',2),struct ('a',NaN,'b',2)), true) |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
49 %!assert (isequalwithequalnans (1,2,1), false) |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
50 |