bicgstab
sparse · scripts/sparse/bicgstab.m
x = bicgstab (A, b, tol, maxit, M1, M2, x0)
[x, flag, relres, iter, resvec] = bicgstab (...)
Stabilized biconjugate gradients for A*x = b with a general square A. A
is a matrix or a function handle returning A*x; the preconditioner is
M = M1*M2 (matrices or handles returning M\x). Every iteration has two
half steps, so iter can end in .5 and resvec has 2*iter+1 entries.
flag: 0 converged, 1 maxit reached, 2 preconditioner failure,
3 stagnation, 4 breakdown.