Mercurial > hg > octave-lyh
diff liboctave/dMatrix.cc @ 4130:7d9bda865012
[project @ 2002-10-28 21:05:30 by jwe]
author | jwe |
---|---|
date | Mon, 28 Oct 2002 21:05:31 +0000 |
parents | 9a1bdd7fff3e |
children | 6b96ce9f5743 |
line wrap: on
line diff
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -2216,12 +2216,13 @@ std::ostream& operator << (std::ostream& os, const Matrix& a) { -// int field_width = os.precision () + 7; - for (int i = 0; i < a.rows (); i++) { for (int j = 0; j < a.cols (); j++) - os << " " /* setw (field_width) */ << a.elem (i, j); + { + os << " "; + octave_write_double (os, a.elem (i, j)); + } os << "\n"; } return os; @@ -2241,7 +2242,7 @@ for (int i = 0; i < nr; i++) for (int j = 0; j < nc; j++) { - is >> tmp; + tmp = octave_read_double (is); if (is) a.elem (i, j) = tmp; else