diff liboctave/dMatrix.cc @ 6840:2f17d5556756

[project @ 2007-08-29 08:37:47 by dbateman]
author dbateman
date Wed, 29 Aug 2007 08:37:48 +0000
parents 3f4ccca05612
children be176b7e110a
line wrap: on
line diff
--- a/liboctave/dMatrix.cc	Tue Aug 28 15:28:13 2007 +0000
+++ b/liboctave/dMatrix.cc	Wed Aug 29 08:37:48 2007 +0000
@@ -851,7 +851,7 @@
 
   if (typ == MatrixType::Upper || typ == MatrixType::Lower)
     ret = tinverse (mattype, info, rcond, force, calc_cond);
-  else if (typ != MatrixType::Rectangular)
+  else
     {
       if (mattype.is_hermitian ())
 	{
@@ -870,6 +870,9 @@
 
       if (!mattype.is_hermitian ())
 	ret = finverse(mattype, info, rcond, force, calc_cond);
+
+      if (rcond == 0.)
+	ret = Matrix (rows (), columns (), octave_Inf);
     }
 
   return ret;