1 function H = extended_rosenbrock_hessian1(x)
3 ## The Hessian of the extended Rosenbrock function. See
4 ## extended_rosenbrock1.m for more information.
6 ## Since the number of arguments is variable, we take a vector
7 ## instead of its individual components.
12 ## 'm' below must be an integer.
20 % The extended Rosenbrock is simply a sum of Rosenbrock
26 H_k = rosenbrock_hessian(y1, y2);
28 H(2*k - 1, 2*k - 1) = H(2*k - 1, 2*k - 1) + H_k(1,1);
29 H(2*k - 1, 2*k) = H(2*k - 1, 2*k) + H_k(1,2);
30 H(2*k, 2*k - 1) = H(2*k, 2*k - 1) + H_k(2,1);
31 H(2*k, 2*k) = H(2*k, 2*k) + H_k(2,2);