% bananah.m  -  Rosenbrock banana function Hessian for M604 HW02
%
% Input parameter xy must be a column vector with two components.
% Output is a symmetric  2 x 2  matrix.

function z = bananah(xy)

z = zeros(2,2);

x = xy(1);
y = xy(2);

z12 = -400*x;

z = [1200*x^2-400*y+2, z12; ...
     z12, 200];

