cpcg.m

CPCG -CIRCULANT PRECONDITIONED CONJUGATE GRADIENT METHOD.
3.4K Downloads
Updated 8 Aug 2000

No License

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 (2024). cpcg.m (https://www.mathworks.com/matlabcentral/fileexchange/44-cpcg-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Linear Algebra in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0