]> gitweb.michael.orlitzky.com - octave.git/commitdiff
Two minor optimizations to test functions.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 14 Mar 2013 04:22:03 +0000 (00:22 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 14 Mar 2013 04:22:03 +0000 (00:22 -0400)
optimization/test_functions/himmelblau_hessian.m
optimization/test_functions/rosenbrock_hessian.m

index 5a8752fa93990305f5f6e2d57f20d392375b627e..24b277ac914958e283283396d1b7b841d9bb1b41 100644 (file)
@@ -6,6 +6,6 @@ function H = himmelblau_hessian(x1, x2)
   H = zeros(2,2);
   H(1,1) = 12*x1^2 + 4*x2 - 42;
   H(1,2) = 4*x1 + 4*x2;
-  H(2,1) = 4*x1 + 4*x2;
+  H(2,1) = H(1,2);
   H(2,2) = 12*x2^2 + 4*x1 - 26;
 end
index cd2a2b502a62e4a625046d26119da19430ba8c06..066b5aeaa5dfdf4cd44d6d0202a04d035c0a3ae8 100644 (file)
@@ -6,6 +6,6 @@ function H = rosenbrock_hessian(x1, x2)
   H = zeros(2,2);
   H(1,1) = 1200*x1^2 - 400*x2 + 2;
   H(1,2) = -400*x1;
-  H(2,1) = -400*x1;
+  H(2,1) = H(1,2);
   H(2,2) = 200;
 end