Mercurial > hg > octave-nkf
diff src/ov-bool-mat.cc @ 5157:8ca032643f55
[project @ 2005-02-23 00:18:58 by jwe]
author | jwe |
---|---|
date | Wed, 23 Feb 2005 00:18:58 +0000 |
parents | e35b034d3523 |
children | 23b37da9fd5b |
line wrap: on
line diff
--- a/src/ov-bool-mat.cc +++ b/src/ov-bool-mat.cc @@ -334,6 +334,18 @@ dv(i) = di; } + // Convert an array with a single dimension to be a row vector. + // Octave should never write files like this, other software + // might. + + if (mdims == 1) + { + mdims = 2; + dv.resize (mdims); + dv(1) = dv(0); + dv(0) = 1; + } + int nel = dv.numel (); OCTAVE_LOCAL_BUFFER (char, htmp, nel); if (! is.read (htmp, nel))