diff scripts/sparse/bicgstab.m @ 21178:3be6a07e8bad

maint: Periodic merge of stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 02 Feb 2016 17:06:11 -0500
parents 516bb87ea72e 2935d56203a4
children c53bfd6d8e08
line wrap: on
line diff
--- a/scripts/sparse/bicgstab.m	Tue Feb 02 16:53:01 2016 -0500
+++ b/scripts/sparse/bicgstab.m	Tue Feb 02 17:06:11 2016 -0500
@@ -76,7 +76,7 @@
 
     if (ischar (A))
       A = str2func (A);
-    elseif (isnumeric(A) && ismatrix (A))
+    elseif (isnumeric(A) && issquare (A))
       Ax  = @(x) A  * x;
     elseif (isa (A, "function_handle"))
       Ax  = @(x) feval (A, x);
@@ -101,7 +101,7 @@
     elseif (isa (M1, "function_handle"))
       M1m1x = @(x) feval (M1, x);
     else
-      error ("bicgstab: preconditioner must be a function or matrix");
+      error ("bicgstab: preconditioner M1 must be a function or matrix");
     endif
 
     if (nargin < 6 || isempty (M2))
@@ -113,7 +113,7 @@
     elseif (isa (M2, "function_handle"))
       M2m1x = @(x) feval (M2, x);
     else
-      error ("bicgstab: preconditioner must be a function or matrix");
+      error ("bicgstab: preconditioner M2 must be a function or matrix");
     endif
 
     precon = @(x) M2m1x (M1m1x (x));