

N=101;
a=-1;b=1;
c=-1;d=1;
x=linspace(a,b,N);
y=linspace(c,d,N);

for i=1:N;
for j=1:N;

z(i,j)=10+x(j)*sin(2*pi*x(j))+y(i)*sin(2*pi*y(i));
end;
end;
surf(x,y,z)
box on;
xlabel('x'); ylabel('y');zlabel('z');
title('$z=10+x \sin(2\pi x)+ y \sin(2\pi y)$','Interpreter','latex');
 
figure;
contour(x,y,z,20)
axis([a b c d]);
axis square;
title('Level curves: $z=10+x \sin(2\pi x)+ y \sin(2\pi y)$','Interpreter','latex');
