]> gitweb.michael.orlitzky.com - octave.git/blob - optimization/test_functions/wood_hessian.m
Replace ##-style comments with %-style comments in all non-test code.
[octave.git] / optimization / test_functions / wood_hessian.m
1 function H = wood_hessian(x1, x2, x3, x4)
2 %
3 % The Hessian of the Wood function. See wood.m for more
4 % information.
5 %
6 H = zeros(4,4);
7 H(1,1) = 1200*x(1)^2 - 400*x(2) + 2;
8 H(1,2) = -400*x(1);
9 H(1,3) = 0;
10 H(1,4) = 0;
11 H(2,1) = H(1,2);
12 H(2,2) = 220.2;
13 H(2,3) = 0;
14 H(2,4) = 19.8;
15 H(3,1) = H(1,3);
16 H(3,2) = H(2,3);
17 H(3,3) = 1080*x(3)^2 - 360*x(4) + 2;
18 H(3,4) = -360*x(3);
19 H(4,1) = H(1,4);
20 H(4,2) = H(2,4);
21 H(4,3) = H(3,4);
22 H(4,4) = 200.2;
23 end