Mercurial > hg > octave-terminal
changeset 11779:65e41465c46b release-3-0-x
[mq]: cellstr
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 22 May 2008 22:00:26 +0200 |
parents | 45e71c7d7bb9 |
children | fe8f87d9133e |
files | scripts/ChangeLog src/ChangeLog src/ov-cell.cc |
diffstat | 3 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-06-02 Jaroslav Hajek <highegg@gmail.com> + + * strings/strcat.m: Add tests. + 2008-06-02 Kim Hansen <kimhanse@gmail.com> * strings/mat2str.m: Change is_complex to iscomplex, add tests, add
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-06-02 Jaroslav Hajek <highegg@gmail.com> + + * ov-cell.cc (Fcellstr): For compatibility with Matlab, return {''} + when given ''. + 2008-05-06 David Bateman <dbateman@free.fr> * ov-fcn-inline.cc (Finline): Also ignore NaN, Inf, pi, NA and eps.
--- a/src/ov-cell.cc +++ b/src/ov-cell.cc @@ -1079,7 +1079,9 @@ string_vector s = args(0).all_strings (); if (! error_state) - retval = Cell (s, true); + retval = (s.is_empty () + ? Cell (octave_value (std::string ())) + : Cell (s, true)); else error ("cellstr: expecting argument to be a 2-d character array"); }