GCG Generalized conjugate gradient method
GCG Generalized conjugate gradient method
X = GCG(A,B) attempts to solve the system of linear equations A*X=B
for X. The N-by-N coefficient matrix A must be symmetric and positive
definite and the right hand side column vector B must have length N.
X = GCG(A,B,TOL) specifies the tolerance of the method. If TOL is []
then GCG uses the default, 1e-6.
X = GCG(A,B,TOL,MAXIT) specifies the maximum number of iterations. If
MAXIT is [] then GCG uses the default, min(N,20).
X = GCG(A,B,TOL,MAXIT,MINV) provides auxiliary matrix inverse Minv of a
simpler solvable system. If MINV is [] then GCG uses the default,
eye(N,N).
X = GCG(A,B,TOL,MAXIT,M,X0) specifies the initial guess. If X0 is []
then GCG uses the default, an all zero vector.
[X K] = GCG(A,B) returns the number of iterations K.
References:
[CGO1976] Concus, P., Golub, G.H. and O'Leary D.P.: "A generalized
conjugate gradient method for the numerical solution of
elliptic partial differential equations", in Sparse Matrix
Computations, Bunch J. R and Rose, D. J., eds., Academic
Press, 1976, pp. 309-332.
See also pcg, bicg. bicgstab, bicgstabl and cgs.
Cite As
Mario Weder (2026). GCG Generalized conjugate gradient method (https://www.mathworks.com/matlabcentral/fileexchange/49720-gcg-generalized-conjugate-gradient-method), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
