# HG changeset patch # User jwe # Date 774040970 0 # Node ID f13cce2fda30cf2838b4af22c9037c625f37ad8d # Parent 08a3f07adc78cfb9bfb429ca8568a8ea3f07b7f7 [project @ 1994-07-12 19:21:17 by jwe] diff -r 08a3f07adc78 -r f13cce2fda30 src/pt-const.cc --- a/src/pt-const.cc Tue Jul 12 17:58:03 1994 +0000 +++ b/src/pt-const.cc Tue Jul 12 19:22:50 1994 +0000 @@ -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: