cgm(A,b)

Solves Ax=b using the conjugate gradient method.
124 Downloads
Updated 16 Apr 2018

View License

Solves Ax=b using the conjugate gradient method. The matrix A should be symmetric and positive definite.
Usage (examples provided at end of m-file):
x=cgm(A,b);

If the matrix is sparse, it is worth trying:
x=cgm(sparse(A),b);

Cite As

Mark Holmes (2024). cgm(A,b) (https://www.mathworks.com/matlabcentral/fileexchange/56208-cgm-a-b), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Polynomials in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.1.0.0

mostly modified the comments; the CGM code is unchanged

1.0.0.0