The following Matlab project contains the source code and Matlab examples used for conjugate gradient.
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

The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there.

## Project Files:

File Name | Size |
---|---|

cgsolver.m | 916 |

license.txt | 1306 |