Mercurial > hg > octave-lojdl
changeset 512:f13cce2fda30
[project @ 1994-07-12 19:21:17 by jwe]
author | jwe |
---|---|
date | Tue, 12 Jul 1994 19:22:50 +0000 |
parents | 08a3f07adc78 |
children | 3c95cec7dd05 |
files | src/pt-const.cc |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-const.cc +++ b/src/pt-const.cc @@ -353,13 +353,19 @@ ColumnVector tmp (count); for (int i = 0; i < count; i++) tmp (i) = nr * (j_idx (i) - 1.0) + i_idx (i); - retval(0) = tree_constant (tmp, (nr != 1)); // Blame it on Matlab... + retval(0) = tree_constant (tmp, 1); +// If you want this to work more like Matlab, use the following line +// instead of the previous one. +// retval(0) = tree_constant (tmp, (nr != 1)); } break; case 3: - retval(2) = val; + retval(2) = tree_constant (val, 1); case 2: - retval(0) = tree_constant (i_idx, (nr != 1)); // Blame it on Matlab... + retval(0) = tree_constant (tmp, 1); +// If you want this to work more like Matlab, use the following line +// instead of the previous one. +// retval(0) = tree_constant (tmp, (nr != 1)); retval(1) = tree_constant (j_idx, 1); break; default: