Mercurial > hg > octave-nkf
diff liboctave/dMatrix.cc @ 10213:f7ba6cfe7fb7
fix det() after singular matrix is flagged
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 28 Jan 2010 08:06:13 +0100 |
parents | 4c0cdbe0acca |
children | 07ebe522dac2 |
line wrap: on
line diff
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -1242,8 +1242,14 @@ { volatile int typ = mattype.type (); + // Even though the matrix is marked as singular (Rectangular), we may + // still get a useful number from the LU factorization, because it always + // completes. + if (typ == MatrixType::Unknown) typ = mattype.type (*this); + else if (typ == MatrixType::Rectangular) + typ = MatrixType::Full; if (typ == MatrixType::Lower || typ == MatrixType::Upper) {