Add the Himmelblau function, as defined in Applied Nonlinear Programming.
[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) = 4*x1 + 4*x2;
10 H(2,2) = 12*x2^2 + 4*x1 - 26;
11 end