diff liboctave/CMatrix.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 83619ae96c1d
line wrap: on
line diff
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -1182,7 +1182,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 ())
 	{
@@ -1201,6 +1201,9 @@
 
       if (!mattype.is_hermitian ())
 	ret = finverse(mattype, info, rcond, force, calc_cond);
+
+      if (rcond == 0.)
+	ret = ComplexMatrix (rows (), columns (), Complex (octave_Inf, 0.));
     }
 
   return ret;