Mercurial > hg > octave-lyh
diff scripts/sparse/cgs.m @ 13076:59def8890992
codesprint: avoid crash after running tests
* cgs.m: Use anonymous function for test.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 03 Sep 2011 16:25:48 -0400 |
parents | 4b110dd204b9 |
children | 1bf456b4e51c |
line wrap: on
line diff
--- a/scripts/sparse/cgs.m +++ b/scripts/sparse/cgs.m @@ -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