Back to Sparse Matrices
bicgstab
BiConjugate Gradients Stabilized method
Syntax
x = bicgstab(A, b) [x, flag, relres, iter] = bicgstab(A, b, tol, maxit)
Description
Solves the linear system Ax = b using the BiCGSTAB iterative method. Works for general (non-symmetric) sparse matrices.
Parameters
| Name | Description |
|---|---|
| A | Sparse coefficient matrix |
| b | Right-hand side vector |
| tol(optional) | Convergence tolerance (default 1e-6) |
| maxit(optional) | Maximum iterations |
Returns
Solution vector x, or [x, flag, relres, iter]
Examples
Try It
>> x = bicgstab(A, b)