Solve
A x = busing the Bi-conjugate gradient iterative method.
- rtol is the relative tolerance, if not given or set to [] the default value 1e-6 is used.
 - maxit the maximum number of outer iterations, if not given or set to [] the default value
 min (20, numel (b))is used.- x0 the initial guess, if not given or set to [] the default value
 zeros (size (b))is used.A can be passed as a matrix or as a function handle or inline function
fsuch thatf(x, "notransp") = A*xandf(x, "transp") = A'*x.The preconditioner P is given as
P = M1 * M2. Both M1 and M2 can be passed as a matrix or as a function handle or inline functiongsuch thatg(x, 'notransp') = M1 \ xorg(x, 'notransp') = M2 \ xandg(x, 'transp') = M1' \ xorg(x, 'transp') = M2' \ x.If called with more than one output parameter
- flag indicates the exit status:
 (the value 2 is unused but skipped for compatibility).
- 0: iteration converged to the within the chosen tolerance
 - 1: the maximum number of iterations was reached before convergence
 - 3: the algorithm reached stagnation
 - relres is the final value of the relative residual.
 - iter is the number of iterations performed.
 - resvec is a vector containing the relative residual at each iteration.
 
Solve
A x = busing the stabilizied Bi-conjugate gradient iterative method.
- rtol is the relative tolerance, if not given or set to [] the default value 1e-6 is used.
 - maxit the maximum number of outer iterations, if not given or set to [] the default value
 min (20, numel (b))is used.- x0 the initial guess, if not given or set to [] the default value
 zeros (size (b))is used.A can be passed as a matrix or as a function handle or inline function
fsuch thatf(x) = A*x.The preconditioner P is given as
P = M1 * M2. Both M1 and M2 can be passed as a matrix or as a function handle or inline functiongsuch thatg(x) = M1 \ xorg(x) = M2 \ x.If called with more than one output parameter
- flag indicates the exit status:
 (the value 2 is unused but skipped for compatibility).
- 0: iteration converged to the within the chosen tolerance
 - 1: the maximum number of iterations was reached before convergence
 - 3: the algorithm reached stagnation
 - relres is the final value of the relative residual.
 - iter is the number of iterations performed.
 - resvec is a vector containing the relative residual at each iteration.
 
Solve
A x = b, where A is a square matrix, using the Conjugate Gradients Squared method.
- rtol is the relative tolerance, if not given or set to [] the default value 1e-6 is used.
 - maxit the maximum number of outer iterations, if not given or set to [] the default value
 min (20, numel (b))is used.- x0 the initial guess, if not given or set to [] the default value
 zeros (size (b))is used.A can be passed as a matrix or as a function handle or inline function
fsuch thatf(x) = A*x.The preconditioner P is given as
P = M1 * M2. Both M1 and M2 can be passed as a matrix or as a function handle or inline functiongsuch thatg(x) = M1 \ xorg(x) = M2 \ x.If called with more than one output parameter
- flag indicates the exit status:
 (the value 2 is unused but skipped for compatibility).
- 0: iteration converged to the within the chosen tolerance
 - 1: the maximum number of iterations was reached before convergence
 - 3: the algorithm reached stagnation
 - relres is the final value of the relative residual.
 - iter is the number of iterations performed.
 - resvec is a vector containing the relative residual at each iteration.
 
Solve
A x = busing the Preconditioned GMRES iterative method with restart, a.k.a. PGMRES(m).
- rtol is the relative tolerance, if not given or set to [] the default value 1e-6 is used.
 - maxit is the maximum number of outer iterations, if not given or set to [] the default value
 min (10, numel (b) / restart)is used.- x0 is the initial guess, if not given or set to [] the default value
 zeros(size (b))is used.- m is the restart parameter, if not given or set to [] the default value
 numel (b)is used.Argument A can be passed as a matrix, function handle, or inline function
fsuch thatf(x) = A*x.The preconditioner P is given as
P = M1 * M2. Both M1 and M2 can be passed as a matrix, function handle, or inline functiongsuch thatg(x) = M1\xorg(x) = M2\x.Besides the vector x, additional outputs are:
- flag indicates the exit status:
 
- 0 : iteration converged to within the specified tolerance
 - 1 : maximum number of iterations exceeded
 - 2 : unused, but skipped for compatibility
 - 3 : algorithm reached stagnation
 - relres is the final value of the relative residual.
 - iter is a vector containing the number of outer iterations and total iterations performed.
 - resvec is a vector containing the relative residual at each iteration.