]> gitweb.michael.orlitzky.com - octave.git/blob - optimization/test_functions/himmelblau_hessian.m
24b277ac914958e283283396d1b7b841d9bb1b41
[octave.git] / optimization / test_functions / himmelblau_hessian.m
1 function H = himmelblau_hessian(x1, x2)
2 ##
3 ## The Hessian of the Himmelblau function. See himmelblau.m for more
4 ## information.
5 ##
6 H = zeros(2,2);
7 H(1,1) = 12*x1^2 + 4*x2 - 42;
8 H(1,2) = 4*x1 + 4*x2;
9 H(2,1) = H(1,2);
10 H(2,2) = 12*x2^2 + 4*x1 - 26;
11 end