function [g,H] = ghban(x) % GHBAN computes gradient & Hessian % of Rosenbrock's banana function % g = [ -400*x(1)*(x(2)-x(1)^2)-2*(1-x(1)) 200*(x(2)-x(1)^2) ]; % H = [ -400*(x(2)-3*x(1)^2)+2 -400*x(1) -400*x(1) 200 ];