Write a MATLAB program to implement the quasi-Newton algorithmfor general functions. Use the secant method for the line search.Test the various update formulas for Hk on Rosenbrock’s function,with an initial condition x0 = [-2, 2]’.
Reinitialize the update direction to the negative gradient everysix iterations (set H = I when mod(k,6) == 0).
Expert Answer
Answer to Write a MATLAB program to implement the quasi-Newton algorithm for general functions. Use the secant method for the line…