changeset 24003:6bba9e4a1e8d

bicgstab.m, cgs.m: Fix typo preventing use of string input (bug #51219). * bicgstab.m, cgs.m: If input is string, use str2func to create a function handle and assign it to variable "Ax", not input "A".
author Rik <rik@octave.org>
date Mon, 04 Sep 2017 21:34:16 -0700
parents 94cbb6dd7b21
children ce4fc86e8e77
files scripts/sparse/bicgstab.m scripts/sparse/cgs.m
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/sparse/bicgstab.m	Mon Sep 04 21:12:33 2017 -0700
+++ b/scripts/sparse/bicgstab.m	Mon Sep 04 21:34:16 2017 -0700
@@ -77,7 +77,7 @@
   endif
 
   if (ischar (A))
-    A = str2func (A);
+    Ax = str2func (A);
   elseif (isnumeric(A) && issquare (A))
     Ax = @(x) A  * x;
   elseif (isa (A, "function_handle"))
--- a/scripts/sparse/cgs.m	Mon Sep 04 21:12:33 2017 -0700
+++ b/scripts/sparse/cgs.m	Mon Sep 04 21:34:16 2017 -0700
@@ -73,7 +73,7 @@
   if (nargin >= 2 && nargin <= 7 && isvector (full (b)))
 
     if (ischar (A))
-      A = str2func (A);
+      Ax = str2func (A);
     elseif (isnumeric (A) && issquare (A))
       Ax = @(x) A * x;
     elseif (isa (A, "function_handle"))