Two minor optimizations to test functions.
[octave.git] / optimization / test_functions / rosenbrock_hessian.m
1 function H = rosenbrock_hessian(x1, x2)
2 ##
3 ## The Hessian of the Rosenbrock function. See rosenbrock.m for more
4 ## information.
5 ##
6 H = zeros(2,2);
7 H(1,1) = 1200*x1^2 - 400*x2 + 2;
8 H(1,2) = -400*x1;
9 H(2,1) = H(1,2);
10 H(2,2) = 200;
11 end