Conjugate Gradient Method

Unconstrained Optimization Problem
546 Downloads
Updated 8 Jan 2021

View License

Fletcher–Reeves Method
The iterative procedure of Fletcher–Reeves method can be stated as follows:
1. Start with an arbitrary initial point X1.
2. Set the first search direction S1 =−∇f(X1) = −∇f1.
3. Find the point X2 according to the relation
X2 = X1 + λ∗1 S1
where λ∗1 is the optimal step length in the direction S1. Set i = 2 and go to the
next step.
4. Find ∇fi = ∇f(Xi), and set
Si = −∇fi +
|∇fi|2
|∇fi−1|2 Si−1
5. Compute the optimum step length λ∗i in the direction Si, and find the new point
Xi+1 = Xi + λ∗i Si
6. Test for the optimality of the point Xi+1. If Xi+1 is optimum, stop the process.
Otherwise, set the value of i = i + 1 and go to step 4.

Cite As

Narayan Das Ahirwar (2026). Conjugate Gradient Method (https://uk.mathworks.com/matlabcentral/fileexchange/85338-conjugate-gradient-method), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0