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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
2 ##
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
4 ##
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
6 ## under the terms of the GNU General Public License as published by
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
8 ## your option) any later version.
5549
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
9 ##
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
13 ## General Public License for more details.
5549
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
14 ##
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6046
diff changeset
17 ## <http://www.gnu.org/licenses/>.
5549
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
18
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
5550
815926a781f6 [project @ 2005-11-30 03:22:53 by jwe]
jwe
parents: 5549
diff changeset
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
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
23 ## @end deftypefn
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
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
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
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
815926a781f6 [project @ 2005-11-30 03:22:53 by jwe]
jwe
parents: 5549
diff changeset
34 endif
5549
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
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
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
38 endfunction
6db3a5df1eab [project @ 2005-11-30 03:15:19 by jwe]
jwe
parents:
diff changeset
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