Mercurial > hg > octave-terminal
changeset 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 | 386024135ce6 |
children | 1bf456b4e51c |
files | scripts/sparse/cgs.m |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
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