function z = globalfun(x, a, b, c)

% Parametric version of the "peaks" function 
% for use in the global optimization exercise. 

z =  a*(1-x(1)).^2.*exp(-(x(1).^2) - (x(2)+1).^2) ...
   - b*(x(1)/5 - x(1).^3 - x(2).^5).*exp(-x(1).^2-x(2).^2) ...
   - c*exp(-(x(1)+1).^2 - x(2).^2);