Mercurial > hg > octave-lyh
diff liboctave/dRowVector.cc @ 1677:ef7f804cb722
[project @ 1995-12-28 20:20:29 by jwe]
author | jwe |
---|---|
date | Thu, 28 Dec 1995 20:22:03 +0000 |
parents | 23aa282707e8 |
children | 1ef83ee34815 |
line wrap: on
line diff
--- a/liboctave/dRowVector.cc +++ b/liboctave/dRowVector.cc @@ -220,8 +220,8 @@ return RowVector (); } - if (len == 0 || a.cols () == 0) - return RowVector (0); + if (len == 0) + return RowVector (a.cols (), 0.0); // Transpose A to form A'*x == (x'*A)' @@ -230,12 +230,12 @@ int ld = a_nr; - double *y = new double [len]; + double *y = new double [a_nc]; F77_FCN (dgemv, DGEMV) ("T", a_nc, a_nr, 1.0, a.data (), ld, v.data (), 1, 0.0, y, 1, 1L); - return RowVector (y, len); + return RowVector (y, a_nc); } // other operations