X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=optimization%2Ftest_functions%2Fpowell_hessian.m;fp=optimization%2Ftest_functions%2Fpowell_hessian.m;h=48cc390df91b3ac1436bb3ead7c2190c9a3a500a;hp=0000000000000000000000000000000000000000;hb=1e0c72bb336872f0839305340eb9699a87a40319;hpb=54c2041babd3d3b67c9d26162f44da66f66b12db diff --git a/optimization/test_functions/powell_hessian.m b/optimization/test_functions/powell_hessian.m new file mode 100644 index 0000000..48cc390 --- /dev/null +++ b/optimization/test_functions/powell_hessian.m @@ -0,0 +1,27 @@ +function H = powell_hessian(x1, x2, x3, x4) + ## + ## The Hessian of the Powell function. See powell.m for more + ## information. + ## + H = zeros(4,4); + + H(1,1) = 120*(x1 - x4)^2 + 2; + H(1,2) = 20; + H(1,3) = 0; + H(1,4) = -120*(x1 - x4)^2; + + H(2,1) = H(1,2); + H(2,2) = 12*(x2 - 2*x3)^2 + 200; + H(2,3) = -24*(x2 - 2*x3)^2; + H(2,4) = 0; + + H(3,1) = H(1,3); + H(3,2) = H(1,3); + H(3,3) = 48*(x2 - 2*x3)^2 + 10; + H(3,4) = -10; + + H(4,1) = H(1,4); + H(4,2) = H(2,4); + H(4,3) = H(3,4); + H(4,4) = 120*(x1 - x4)^2 + 10; +end