Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
The conjugate gradient method aims to solve a system of linear equations, Ax=b, where A is symmetric, without calculation of the inverse of A. It only requires a very small amount of membory, hence is particularly suitable for large scale systems.
It is faster than other approach such as Gaussian elimination if A is well-conditioned. For example,
n=1000;
[U,S,V]=svd(randn(n));
s=diag(S);
A=U*diag(s+max(s))*U'; % to make A symmetric, well-contioned
b=randn(1000,1);
tic,x=conjgrad(A,b);toc
tic,x1=A\b;toc
norm(x-x1)
norm(x-A*b)
Conjugate gradient is about two to three times faster than A\b, which uses the Gaissian elimination.
Citar como
Yi Cao (2026). Conjugate Gradient Method (https://es.mathworks.com/matlabcentral/fileexchange/22494-conjugate-gradient-method), MATLAB Central File Exchange. Recuperado .
Información general
- Versión 1.3.0.0 (1,49 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
