60d98544724801228bf2d52003cf8a508fed0604
[octave.git] / optimization / test_functions / wood_hessian1.m
1 function H = wood_hessian1(x)
2 ##
3 ## A version of the wood_hessian() function which takes a column
4 ## 4-vector instead of four distinct arguments. See wood_hessian.m
5 ## for more information.
6 ##
7 H = zeros(4,4);
8 H(1,1) = 1200*x(1)^2 - 400*x(2) + 2;
9 H(1,2) = -400*x(1);
10 H(1,3) = 0;
11 H(1,4) = 0;
12 H(2,1) = H(1,2);
13 H(2,2) = 220.2;
14 H(2,3) = 0;
15 H(2,4) = 19.8;
16 H(3,1) = H(1,3);
17 H(3,2) = H(2,3);
18 H(3,3) = 1080*x(3)^2 - 360*x(4) + 2;
19 H(3,4) = -360*x(3);
20 H(4,1) = H(1,4);
21 H(4,2) = H(2,4);
22 H(4,3) = H(3,4);
23 H(4,4) = 200.2;
24 end