Mercurial > hg > octave-nkf
changeset 15621:e9d842dcfc91
*data.cc (Fsum): allow string arguments for Matlab compatibility
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Wed, 21 Nov 2012 15:29:54 -0500 |
parents | 9bbc96a6ef94 |
children | d928ad126b66 |
files | libinterp/interpfcn/data.cc |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/data.cc +++ b/libinterp/interpfcn/data.cc @@ -2792,7 +2792,13 @@ MAKE_INT_BRANCH (uint32); MAKE_INT_BRANCH (uint64); #undef MAKE_INT_BRANCH - + // GAGME: Accursed Matlab compatibility... + case btyp_char: + if (isextra) + retval = arg.array_value (true).xsum (dim); + else + retval = arg.array_value (true).sum (dim); + break; case btyp_bool: if (arg.is_sparse_type ()) {