Mercurial > hg > octave-lyh
changeset 6399:e4d3e9bddff3
[project @ 2007-03-08 21:12:59 by dbateman]
author | dbateman |
---|---|
date | Thu, 08 Mar 2007 21:12:59 +0000 |
parents | 9bd49ed48ee6 |
children | 566343604d95 |
files | src/ChangeLog src/data.cc |
diffstat | 2 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-03-08 David Bateman <dbateman@free.fr> + + * data.cc (do_cat): Ignore leading empty matrices. + 2007-03-07 Bob Weigel <rweigel@gmu.edu> * urlwrite.cc (urlget): Allow URL redirects.
--- a/src/data.cc +++ b/src/data.cc @@ -736,7 +736,8 @@ octave_value tmp; - for (int i = 1; i < n_args; i++) + int i; + for (i = 1; i < n_args; i++) { if (! args (i).all_zero_dims ()) { @@ -752,14 +753,14 @@ Array<int> ra_idx (dv.length (), 0); - for (int i = 1; i < n_args; i++) + for (int j = i; j < n_args; j++) { - tmp = do_cat_op (tmp, args (i), ra_idx); + tmp = do_cat_op (tmp, args (j), ra_idx); if (error_state) return retval; - dim_vector dv_tmp = args (i).dims (); + dim_vector dv_tmp = args (j).dims (); ra_idx (dim) += (dim < dv_tmp.length () ? dv_tmp (dim) : 1); }