function hess = rosenhess(x)
% usage: hess = rosenhess(x)
% description: Returns the Hessian matrix for
% rosen(x).

% a little bit of bulletproofing
if (~isvector(x) | (length(x) ~= 2))
  error('rosenhess: needs a two-dimensional vector argument');
end
if (size(x,2) ~= 1)
  error('rosenhess: needs a column vector');
end 
% the actual calculation
hess = [1200*x(1)^2 - 400*x(2) + 2, -400*x(1); -400*x(1), 200];

