Mercurial > hg > octave-avbm
changeset 388:c101e99482e6
[project @ 1994-03-17 07:44:10 by jwe]
author | jwe |
---|---|
date | Thu, 17 Mar 1994 07:44:10 +0000 |
parents | dd2a919873e8 |
children | 4cb0c5015dc3 |
files | src/tc-index.cc |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-index.cc +++ b/src/tc-index.cc @@ -109,6 +109,12 @@ { rows = 1; } + else if (args[1].is_scalar_type () + && NINT (args[1].double_value ()) == 0) + { + Matrix m (0, 0); + return tree_constant (m); + } else break; @@ -294,7 +300,7 @@ int result_size = iv.length (); - if (columns () == 1 || iv.one_zero_only ()) + if (nc == 1 || (nr != 1 && iv.one_zero_only ())) { CRMATRIX (m, cm, result_size, 1); @@ -307,7 +313,7 @@ ASSIGN_CRMATRIX_TO (retval, m, cm); } - else if (rows () == 1) + else if (nr == 1) { CRMATRIX (m, cm, 1, result_size);