Mercurial > hg > octave-terminal
changeset 481:376ac108f611
[project @ 1994-06-30 14:40:42 by jwe]
author | jwe |
---|---|
date | Thu, 30 Jun 1994 14:40:42 +0000 |
parents | 738791c163b2 |
children | 680426c10c5e |
files | src/tc-extras.cc |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-extras.cc +++ b/src/tc-extras.cc @@ -163,8 +163,18 @@ } else { - nr = a.rows (); - nc = a.columns (); + nr = tmpa.rows (); + nc = tmpa.columns (); + + if ((nr == 1 && nc == 2) || (nr == 2 && nc == 1)) + { + ColumnVector v = tmpa.to_vector (); + + nr = NINT (v.elem (0)); + nc = NINT (v.elem (1)); + } + else + warning ("%s (A): use %s (size (A)) instead", warn_for, warn_for); } check_dimensions (nr, nc, warn_for); // May set error_state.