function y = gegg(x) % % gradient for the egg crate surface % y = x; y(1) = cos(x(1))*sin(x(2)); y(2) = sin(x(1))*cos(x(2));