X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=optimization%2Ftest_functions%2Fwood_hessian1.m;fp=optimization%2Ftest_functions%2Fwood_hessian1.m;h=60d98544724801228bf2d52003cf8a508fed0604;hp=0000000000000000000000000000000000000000;hb=87d434fa93b3e52e8a5a0a9d99ae43492c35e1be;hpb=be86b42e1f06a8dddb6dd50832307e7d776023df diff --git a/optimization/test_functions/wood_hessian1.m b/optimization/test_functions/wood_hessian1.m new file mode 100644 index 0000000..60d9854 --- /dev/null +++ b/optimization/test_functions/wood_hessian1.m @@ -0,0 +1,24 @@ +function H = wood_hessian1(x) + ## + ## A version of the wood_hessian() function which takes a column + ## 4-vector instead of four distinct arguments. See wood_hessian.m + ## for more information. + ## + H = zeros(4,4); + H(1,1) = 1200*x(1)^2 - 400*x(2) + 2; + H(1,2) = -400*x(1); + H(1,3) = 0; + H(1,4) = 0; + H(2,1) = H(1,2); + H(2,2) = 220.2; + H(2,3) = 0; + H(2,4) = 19.8; + H(3,1) = H(1,3); + H(3,2) = H(2,3); + H(3,3) = 1080*x(3)^2 - 360*x(4) + 2; + H(3,4) = -360*x(3); + H(4,1) = H(1,4); + H(4,2) = H(2,4); + H(4,3) = H(3,4); + H(4,4) = 200.2; +end