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);
引用格式
Mark Holmes (2025). cgm(A,b) (https://www.mathworks.com/matlabcentral/fileexchange/56208-cgm-a-b), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2018a
兼容任何版本
平台兼容性
Windows macOS Linux类别
- MATLAB > Mathematics > Elementary Math > Polynomials >
在 Help Center 和 MATLAB Answers 中查找有关 Polynomials 的更多信息
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!