Conjugate Gradient
Version 1.0.0.0 (1.24 KB) by
Yangpai
function [x,out2] = cgsolver(A, b, x0, nitr)
If nitr is provided: stop the solver after nitr iterations and return a matrix
If nitr is not provided: stop the solver when the norm of the residual ~r is less than 11^-8
Cite As
Yangpai (2024). Conjugate Gradient (https://www.mathworks.com/matlabcentral/fileexchange/34916-conjugate-gradient), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2010a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Fourier Analysis and Filtering in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |