# HG changeset patch # User John W. Eaton # Date 1315081548 14400 # Node ID 59def8890992295cb6a14a13fde0ea5e09e1bf17 # Parent 386024135ce6f8a44f3b07e2a13c2345e31510f2 codesprint: avoid crash after running tests * cgs.m: Use anonymous function for test. diff -r 386024135ce6 -r 59def8890992 scripts/sparse/cgs.m --- a/scripts/sparse/cgs.m Sat Sep 03 13:20:28 2011 -0700 +++ b/scripts/sparse/cgs.m Sat Sep 03 16:25:48 2011 -0400 @@ -203,11 +203,7 @@ %! tol = 1e-8; %! maxit = 15; %! -%! function y = afun (x, a) -%! y = a * x; -%! endfunction -%! -%! [x, flag, relres, iter, resvec] = cgs (@(x) afun (x, A), b, tol, maxit, M); +%! [x, flag, relres, iter, resvec] = cgs (@(x) A * x, b, tol, maxit, M); %! assert (x, ones (size (b)), 1e-7); %!test