figure
[x,y] = meshgrid(-pi:.1:pi);
z = x.*exp(-sin(x) - cos(y));
[dx,dy] = gradient(z,.1,.1);
contour(x,y,z)
hold on
quiver(x,y,dx,dy)
colormap hsv
