cpcg.m

CPCG -CIRCULANT PRECONDITIONED CONJUGATE GRADIENT METHOD.

You are now following this Submission

CPCG -CIRCULANT PRECONDITIONED CONJUGATE GRADIENT METHOD.

[x, error, iter, flag] = cpcg(a, b, tol, max_it, c, x0)
[x, error, iter, flag] = cpcg(a, b, c)
[x, error, iter, flag] = cpcg(a, b)

tol, max_it, c, x0 can be replaced by [] and default vaules will be used.

cpcg.m solves the symmetric positive definite Toeplitz linear system Ax=b using the Conjugate Gradient method with a circulant preconditioner C.

Both matrices A and C have to be SYMMETRIC POSITIVE DEFINITE.

input:
a ------ REAL FIRST COLUMN of symmetric positive definite matrix
b ------ REAL right hand side vecto
tol ---- REAL error tolerance
max_it - INTEGER maximum number of iteration
c ------ REAL FIRST COLUMN of CIRCULANT preconditioner matrix
x0 ----- REAL initial guess vector

output:
x ------ REAL solution vector
error -- REAL error norm
iter --- INTEGER number of iterations performed
flag --- INTEGER: 0 = solution found to tolerance
1 = no convergence given max_it

Tested under MATLAB 5.1 and 5.3.

Cite As

Leevan Ling (2026). cpcg.m (https://www.mathworks.com/matlabcentral/fileexchange/44-cpcg-m), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Linear Algebra in Help Center and MATLAB Answers

Tags

Add Tags

Add the first tag.

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0