Mercurial > hg > octave-terminal
changeset 10291:fc879f361bda
make isreal matlab compatible
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 10 Feb 2010 07:29:53 +0100 |
parents | 1756b3035282 |
children | c1246f17119e |
files | src/ChangeLog src/DLD-FUNCTIONS/cellfun.cc src/data.cc src/ov-str-mat.h |
diffstat | 4 files changed, 11 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-02-10 Jaroslav Hajek <highegg@gmail.com> + + * ov-str-mat.h (octave_char_matrix_str::is_real_type): Delete + overload. + * data.cc (Fisreal): Improve docs. + 2010-02-10 Jaroslav Hajek <highegg@gmail.com> * data.cc (Fisnumeric): Improve documentation.
--- a/src/DLD-FUNCTIONS/cellfun.cc +++ b/src/DLD-FUNCTIONS/cellfun.cc @@ -777,8 +777,8 @@ %% First input argument can be the special string "isreal", %% "isempty", "islogical", "length", "ndims" or "prodofsize" %!test -%! A = cellfun ("isreal", {true, 0.1, false, i*2, [], "abc"}); -%! assert (A, [true, true, true, false, true, false]); +%! A = cellfun ("isreal", {true, 0.1, {}, i*2, [], "abc"}); +%! assert (A, [true, true, false, false, true, true]); %!test %! A = cellfun ("isempty", {true, 0.1, false, i*2, [], "abc"}); %! assert (A, [false, false, false, false, true, false]);
--- a/src/data.cc +++ b/src/data.cc @@ -3277,7 +3277,9 @@ DEFUN (isreal, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isreal (@var{x})\n\ -Return true if @var{x} is a real-valued numeric object.\n\ +Return true if @var{x} is a non-complex matrix or scalar.\n\ +For compatibility with Matlab, this includes logical and character\n\ +matrices.\n\ @end deftypefn") { octave_value retval;